/// <summary> /// 数据初始化(填写表名、绑定控制、初始化界面属性等) /// </summary> public override void IniData() { this.HTDataTableName = "WO_FabricProcess"; this.HTDataList = gridView1; this.HTDataDtsAttach = new DevExpress.XtraGrid.Views.Grid.GridView[] { gridView2 }; txtMakeDateS.DateTime = DateTime.Now.AddMonths(-1).Date; txtMakeDateE.DateTime = DateTime.Now.Date; txtReqDateS.DateTime = DateTime.Now.AddMonths(-1).Date; txtReqDateE.DateTime = DateTime.Now.Date; txtBuyMakeDateS.DateTime = DateTime.Now.AddMonths(-3).Date; txtBuyMakeDateE.DateTime = DateTime.Now.Date; //Common.BindVendor(drpDyeFactorty, new int[] { (int)EnumVendorType.工厂 }, true);//放到IniRefreshData drpDyeFactorty.Tag = (int)EnumVendorType.工厂; new VendorProc(drpDyeFactorty); if (ItemBuyStatusProc.ColorIniFlag) { ItemBuyStatusProc.ColorIniTextBox(new TextBox[] { txtColorSOStatus1, txtColorSOStatus2, txtColorSOStatus3, txtColorSOStatus4, txtColorSOStatus5 }); } ParamSetRule psrule = new ParamSetRule(); saveNoLoadCheckDayNum = psrule.RShowIntByCode((int)ParamSetEnum.未加载数据比对天数); this.ToolBarItemAdd(32, "btnUpdateOrderStatus", "修改合同状态", true, UpdateOrderStatusToolStripMenuItem_Click, eShortcut.F9); }
/// <summary> /// 颜色变化 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void gridView1_RowCellStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowCellStyleEventArgs e) { try { if (e.Column.FieldName == "FormStatusName") { e.Appearance.BackColor = ItemBuyStatusProc.GetGridRowBackColor(SysConvert.ToString(gridView1.GetRowCellValue(e.RowHandle, "FormStatusName"))); } } catch (Exception E) { this.ShowMessage(E.Message); } }
/// <summary> /// 绑定Grid /// </summary> public override void BindGrid() { ItemBuyFormRule rule = new ItemBuyFormRule(); DataTable dt = rule.RShowDts(HTDataConditionStr, ProcessGrid.GetQueryField(gridView1).Replace("FormStatusName", "'' FormStatusName")); ItemBuyStatusProc.ProcColorStatusName(dt); ProcDataSourceQty(dt); gridView1.GridControl.DataSource = dt; gridView1.GridControl.Show(); string sql = "SELECT distinct ID FROM UV1_Buy_ItemBuyFormDts WHERE 1=1"; sql += HTDataConditionStr; dt = SysUtils.Fill(sql); lbCount.Text = "采购单数:" + dt.Rows.Count.ToString(); }
/// <summary> /// 数据初始化(填写表名、绑定控制、初始化界面属性等) /// </summary> public override void IniData() { this.HTDataTableName = "Buy_ItemBuyForm"; this.HTDataList = gridView1; this.HTQryContainer = groupControlQuery; txtOrderDateS.DateTime = DateTime.Now.AddMonths(-1).Date; txtOrderDateE.DateTime = DateTime.Now.Date; txtReqDateS.DateTime = DateTime.Now.AddMonths(-1).Date; txtReqDateE.DateTime = DateTime.Now.Date; if (ItemBuyStatusProc.ColorIniFlag) { ItemBuyStatusProc.ColorIniTextBox(new TextBox[] { txtColorSOStatus1, txtColorSOStatus2, txtColorSOStatus3, txtColorSOStatus4, txtColorSOStatus5 }); } btnQuery_Click(null, null); }
/// <summary> /// 绑定Grid /// </summary> public override void BindGrid() { FabricProcessRule rule = new FabricProcessRule(); DataTable dt = rule.RShowDts(HTDataConditionStr, ProcessGrid.GetQueryField(gridView1).Replace("FormStatusName", "'' FormStatusName")); ItemBuyStatusProc.ProcColorStatusName(dt); ProcDataSourceQty(dt); gridView1.GridControl.DataSource = dt; gridView1.GridControl.Show(); string sql = "SELECT distinct ID FROM UV1_WO_FabricProcessDts WHERE 1=1"; sql += HTDataConditionStr; dt = SysUtils.Fill(sql); lbCount.Text = "加工单数:" + dt.Rows.Count.ToString(); ProcessGrid.SetGridEdit(gridView1, new string[] { "HandleStatus", "HandleStatusDate" }, true); }