/// <summary> /// 颜色变化 方法重载 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> public override void _HTDataDts_RowCellStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowCellStyleEventArgs e) { try { base._HTDataDts_RowCellStyle(sender, e); if (e.Column.FieldName == "FormStatusName") { e.Appearance.BackColor = SaleOrderStatusProc.GetGridRowBackColor(SysConvert.ToString(gridView1.GetRowCellValue(e.RowHandle, "FormStatusName"))); } if (e.Column.FieldName == "OrderStepName") { e.Appearance.BackColor = SaleOrderStepProc.GetGridRowBackColor(SysConvert.ToInt32(gridView1.GetRowCellValue(e.RowHandle, "OrderStepID"))); } if (SysConvert.ToInt32(gridView1.GetRowCellValue(e.RowHandle, "CancelFlag")) == 1) { e.Appearance.BackColor = Color.DarkGray; } if (e.Column.FieldName == "ReceiveAmount") { e.Appearance.BackColor = Color.BurlyWood; } } catch (Exception E) { this.ShowMessage(E.Message); } }
/// <summary> /// 绑定Grid /// </summary> public override void BindGrid() { SaleOrderRule rule = new SaleOrderRule(); DataTable dt = rule.RShowDts(HTDataConditionStr, ProcessGrid.GetQueryField(gridView1).Replace("FormStatusName", "'' FormStatusName").Replace("ReceiveAmount", "0.0 ReceiveAmount")); SaleOrderStatusProc.ProcColorStatusName(dt); ProcDataSourceQty(dt); gridView1.GridControl.DataSource = dt; gridView1.GridControl.Show(); string sql = "SELECT COUNT( ID) FROM UV1_Sale_SaleOrderDts WHERE 1=1"; sql += HTDataConditionStr + " GROUP BY ID"; DataTable dtSO = SysUtils.Fill(sql); if (dtSO.Rows.Count > 0) { lbCount.Text = "销售合同数:" + dtSO.Rows[0][0].ToString(); } else { lbCount.Text = "销售合同数:0"; } if (ProductParamSet.GetIntValueByID(5418) == (int)YesOrNo.Yes)//更新回签标志 { sql = "UPDATE Sale_SaleOrder SET HQFlag=1 WHERE FormNo IN (SELECT ISNULL(FileProt2,'') FROM Data_WinListAttachFile WHERE FileProt1=" + SysString.ToDBString(this.Text) + ")"; SysUtils.ExecuteNonQuery(sql); } }
/// <summary> /// 绑定Grid /// </summary> public override void BindGrid() { SaleOrderRule rule = new SaleOrderRule(); DataTable dt = rule.RShowDts(HTDataConditionStr, ProcessGrid.GetQueryField(gridView1).Replace("FormStatusName", "'' FormStatusName")); SaleOrderStatusProc.ProcColorStatusName(dt); ProcDataSourceQty(dt); gridView1.GridControl.DataSource = dt; gridView1.GridControl.Show(); string sql = "SELECT distinct ID FROM UV1_Sale_SaleOrderDts WHERE 1=1"; sql += HTDataConditionStr; dt = SysUtils.Fill(sql); lbCount.Text = "销售合同数:" + dt.Rows.Count.ToString(); }