using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using Pub_Class; namespace SCM { public partial class Sc_WaitingForCutting_List : Form { public Sc_WaitingForCutting_List() { InitializeComponent(); } public string ViewName = "h_p_Sc_PackUnionBillList"; public string ModCaption = "检验/裁切列表"; public const string ModRightName = "Sc_WaitingForCutting_List"; public string HSourceBillType = ""; public string HBillType = "3710";//类型,根据此字段选择裁切还是分切 SCM.WMSWeb.WebService1 oWeb = new SCM.WMSWeb.WebService1(); private void initGrid() { ClsPub1.initGridList(grdMain, this.Name); grdMain.RowTemplate.Height = 60;//行高 grdMain.ColumnHeadersHeight = 60;//设置表头行高 grdMain.RowHeadersWidth = 260; grdMain.RowsDefaultCellStyle.Font = new Font("宋体", 22); grdMain.ReadOnly = true; } private void timer1_Tick(object sender, EventArgs e) { timer1.Enabled = false; initGrid(); Display(); } private void Sc_WaitingForCutting_List_Load(object sender, EventArgs e) { //设置动态URL oWeb.Url = SCM.ClsPub1.WEBSURL; this.Text = ModCaption; } private void timer2_Tick(object sender, EventArgs e) { timer2.Enabled = false; } private void grdMain_Paint(object sender, PaintEventArgs e) { GraphicsGrid(); } private void GraphicsGrid() { //画底线 DBUtility.Xt_BaseBillFun.GraphicsGrid(grdMain); } private Int32 Fun_GetCol(string sCol) { return DBUtility.Xt_BaseBillFun.Fun_GetCol(sCol, grdMain); } //保存列宽 private void bclk_Click(object sender, EventArgs e) { DBUtility.Xt_BaseBillFun.SaveGrid(grdMain, this.Name); } //默认列宽 private void mrlk_Click(object sender, EventArgs e) { DBUtility.Xt_BaseBillFun.DefaultGridView(grdMain, this.Name); } private void Display() { DataSet DS = oWeb.getDataSetBySQL("exec " + ViewName + " '" + HBillType + "'", ViewName, ref DBUtility.ClsPub.sExeReturnInfo); if (DS==null || DS.Tables[0].Rows.Count == 0) { MessageBox.Show("没有找到相关源单信息!" + DBUtility.ClsPub.sExeReturnInfo); return; } grdMain.DataSource = DS.Tables[0].DefaultView;//加载数据 DBUtility.Xt_BaseBillFun.GetGrid(grdMain, this.Name);//获取之前保存的列宽 } //退出按钮 private void btnTC_Click(object sender, EventArgs e) { this.Close(); } } }