Esempio n. 1
0
 private void LoadLadeAssignment()
 {
     try
     {
         HPS.BLL.LadeAssignmentBLL.BLLLadeAssignment_TFactory LadeAssignmentFactory = new HPS.BLL.LadeAssignmentBLL.BLLLadeAssignment_TFactory();
         Properties.Settings Setting       = new HPS.Properties.Settings();
         string    Condition               = string.Format("[LadeAssignment_T].[Accepted_bit]='false' AND (SaloonID_int IS NULL OR LT.SaloonID_int={0}) ", Setting.SaloonID_int != 0 ? Setting.SaloonID_int : 0);
         DataTable LadeAssignmentDataTable = new DataTable();
         LadeAssignmentFactory.GetForAccept(Condition, ref LadeAssignmentDataTable);
         this.LadeAssignmentGridView.SetDataBinding(LadeAssignmentDataTable, "LadeAssignmentDataTable");
     }
     catch (System.Exception ex)
     {
         Hepsa.Core.Common.MessageBox.ErrorMessage(ex.Message);
     }
 }
Esempio n. 2
0
 private void LoadLadeAssignmentWithDate()
 {
     try
     {
         HPS.BLL.LadeAssignmentBLL.BLLLadeAssignment_TFactory LadeAssignmentFactory = new HPS.BLL.LadeAssignmentBLL.BLLLadeAssignment_TFactory();
         Properties.Settings Setting = new HPS.Properties.Settings();
         string Condition            = string.Empty;
         if (Setting.SaloonID_int != 0)
         {
             Condition = string.Format("[LadeAssignment_T].[Accepted_bit]='false' AND LadeAssignment_T.LadingDate_nvc='{0}' AND (LT.SaloonID_int ={1}) ", LadeAssignmentFactory.ServerJalaliDate, Setting.SaloonID_int);
         }
         else
         {
             Condition = string.Format("[LadeAssignment_T].[Accepted_bit]='false' AND LadeAssignment_T.LadingDate_nvc='{0}' ", LadeAssignmentFactory.ServerJalaliDate);
         }
         LadeAssignmentDataTable.Clear();
         LadeAssignmentFactory.GetForAccept(Condition, ref LadeAssignmentDataTable);
         LadeAssignmentGridView.DataSource = null;
         this.LadeAssignmentGridView.SetDataBinding(LadeAssignmentDataTable, "LadeAssignmentDataTable");
         Janus.Windows.GridEX.GridEXFormatStyle Focus = new Janus.Windows.GridEX.GridEXFormatStyle();
         Focus.FontSize = 20;
         Janus.Windows.GridEX.GridEXFormatStyle yellow = new Janus.Windows.GridEX.GridEXFormatStyle();
         yellow.BackColor = System.Drawing.Color.FromArgb(253, 217, 142);
         for (int i = 0; i < ((DataTable)LadeAssignmentGridView.DataSource).Rows.Count; i++)
         {
             if (LadeAssignmentGridView.GetRow(i).Cells["EditUserName_nvc"].Value != DBNull.Value && LadeAssignmentGridView.GetRow(i).Cells["AcceptUserName_nvc"].Value != DBNull.Value)
             {
                 LadeAssignmentGridView.GetRow(i).RowStyle = yellow;
                 LadeAssignmentGridView.GetRow(i).Cells["EditUserName_nvc"].FormatStyle = yellow;
             }
         }
         ChooseLadeAssignmentAcceptedButton.Select();
     }
     catch (System.Exception ex)
     {
         Hepsa.Core.Common.MessageBox.ErrorMessage(ex.Message);
     }
 }