private void save_ma_HD_NCC() { US_GD_DON_DAT_HANG v_us = new US_GD_DON_DAT_HANG(); DS_GD_DON_DAT_HANG v_ds = new DS_GD_DON_DAT_HANG(); int v_i_row_fg = 1; for (v_i_row_fg = 1; v_i_row_fg < m_ds.V_GD_DON_DAT_HANG.Count; v_i_row_fg++) { if (m_fg_don_dat_hang.Rows[v_i_row_fg][(int)e_col_Number.MA_HD_NCC].ToString().Trim() != "") { v_us.Insert_ma_hdncc(v_ds, m_fg_don_dat_hang.Rows[v_i_row_fg][(int)e_col_Number.MA_HD_NCC].ToString().Trim(), m_fg_don_dat_hang.Rows[v_i_row_fg][(int)e_col_Number.MA_HD].ToString()); } v_ds.Clear(); } BaseMessages.MsgBox_Infor("Bạn đã lưu thành công các mã HD NCC đã nhập!"); }
private void kiem_tra_du_lieu_don_dat_hang() { US_GD_DON_DAT_HANG v_us = new US_GD_DON_DAT_HANG(); DS_GD_DON_DAT_HANG v_ds = new DS_GD_DON_DAT_HANG(); int v_i_row_fg = 1; //set Style cell C1.Win.C1FlexGrid.CellStyle v_cell_style_err = this.m_fg_don_dat_hang.Styles.Add("RowColorErr"); v_cell_style_err.BackColor = Color.Yellow; C1.Win.C1FlexGrid.CellStyle v_cell_style_err2 = this.m_fg_don_dat_hang.Styles.Add("RowColorErr2"); v_cell_style_err2.BackColor = Color.Yellow; v_cell_style_err2.ForeColor = Color.DarkRed; C1.Win.C1FlexGrid.CellStyle v_cell_style_ok = this.m_fg_don_dat_hang.Styles.Add("RowColorOk"); v_cell_style_ok.BackColor = Color.AliceBlue; C1.Win.C1FlexGrid.CellStyle v_cell_style_chu_ok = this.m_fg_don_dat_hang.Styles.Add("RowColor"); v_cell_style_chu_ok.BackColor = Color.Black; C1.Win.C1FlexGrid.CellStyle v_cell_style_notOK_in_data = this.m_fg_don_dat_hang.Styles.Add("RowColorNotOk"); v_cell_style_notOK_in_data.BackColor = Color.Green; for (v_i_row_fg = 1; v_i_row_fg <= m_ds.V_GD_DON_DAT_HANG.Count; v_i_row_fg++) { //v_us.Kiem_tra_don_dat_hang_hdncc(v_ds, m_ds.V_GD_DON_DAT_HANG.Rows[v_i_row_fg][(int)e_col_Number.MA_HD].ToString()); //if (v_ds.GD_DON_DAT_HANG.Rows.Count > 0) string t = CIPConvert.ToStr(m_fg_don_dat_hang.Rows[v_i_row_fg][(int)e_col_Number.MA_HD_NCC]).Trim(); if(CIPConvert.ToStr(m_fg_don_dat_hang.Rows[v_i_row_fg][(int)e_col_Number.MA_HD_NCC]).Trim() != "") { m_fg_don_dat_hang.SetCellStyle(v_i_row_fg, (int)e_col_Number.MA_HD_NCC, v_cell_style_ok); } else { m_fg_don_dat_hang.SetCellStyle(v_i_row_fg, (int)e_col_Number.MA_HD_NCC, v_cell_style_err); //m_fg.Rows[v_i_row_fg].StyleDisplay.ForeColor = Color.White; } v_ds.Clear(); } }