예제 #1
0
        private void DeleteButton_Click(object sender, EventArgs e)
        {
            HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_TFactory CompanyLadBillFactory = new HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_TFactory();

            try
            {
                if (Hepsa.Core.Common.MessageBox.ConfirmDeleteMessage() == false)
                {
                    return;
                }


                HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_TFactory CompanyLadBill_TFactory = new HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_TFactory();
                HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_TKeys    CompanyLadBillKey       = new HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_TKeys();

                CompanyLadBillKey.CompanyLadBillID_bint = (Int64)CompanyLadBillGridView.CurrentRow.Cells["colCompanyLadBillID_bint"].Value;
                CompanyLadBillFactory.Delete(CompanyLadBillKey);

                DataRow[] dr = ((DataTable)this.CompanyLadBillGridView.DataSource).Select(HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_T.CompanyLadBill_TField.CompanyLadBillID_bint.ToString() + "='" + CompanyLadBillKey.CompanyLadBillID_bint.ToString() + "'");
                if (dr.Length > 0)
                {
                    dr[0].Delete();
                }
                ((DataTable)this.CompanyLadBillGridView.DataSource).AcceptChanges();
            }

            catch (Exception ex)
            {
                Hepsa.Core.Common.MessageBox.ErrorMessage(ex.Message);
            }
        }
예제 #2
0
        protected override void Delete()
        {
            HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_TFactory CompanyLadBillFactory = new HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_TFactory();

            try
            {
                if (Hepsa.Core.Common.MessageBox.ConfirmMessage(HPS.Exceptions.ExceptionCs.DeleteMessage) == true)
                {
                    CompanyLadBillFactory.BeginProc();
                    CompanyLadBillFactory.Delete((HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_TKeys)Key);
                    CompanyLadBillFactory.CommitProc();
                    if (DataTable != null)
                    {
                        DataRow[] dr = DataTable.Select(HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_T.CompanyLadBill_TField.CompanyLadBillID_bint.ToString() + "='" + ((HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_TKeys)Key).CompanyLadBillID_bint.ToString() + "'");
                        if (dr.Length > 0)
                        {
                            dr[0].Delete();
                        }
                        DataTable.AcceptChanges();
                    }
                    this.Close();
                }
            }
            catch (Exception ex)
            {
                CompanyLadBillFactory.RollBackProc();
                throw ex;
            }
        }
예제 #3
0
        protected override void Insert()
        {
            HPS.BLL.UsedLadBillBLL.BLLUsedLadBill_TFactory UsedLadBillFactory = new HPS.BLL.UsedLadBillBLL.BLLUsedLadBill_TFactory();
            try
            {
                HPS.BLL.UsedLadBillBLL.BLLUsedLadBill_T UsedLadBillEntity = new HPS.BLL.UsedLadBillBLL.BLLUsedLadBill_T();
                UsedLadBillEntity.Serial_nvc            = Hepsa.Core.Common.PersentationController.GetEntityValue(Serial_nvcTextBox.Text, TypeCode.String).ToString();
                UsedLadBillEntity.LadBillNumber_int     = (Int32)Hepsa.Core.Common.PersentationController.GetEntityValue(LadBillNumber_intNumericTextBox.NumericText, TypeCode.Int32);
                UsedLadBillEntity.Comment_nvc           = Hepsa.Core.Common.PersentationController.GetEntityValue(Comment_nvcTextBox.Text, TypeCode.String).ToString();
                UsedLadBillEntity.Date_nvc              = UsedLadBillFactory.ServerJalaliDate;
                UsedLadBillEntity.Time_nvc              = UsedLadBillFactory.ServerTime;
                UsedLadBillEntity.UserName_nvc          = HPS.Common.CurrentUser.user.UserName_nvc;
                UsedLadBillEntity.LadBillCreditID_int   = (Int32)Hepsa.Core.Common.PersentationController.GetEntityValue(LadBillCreditKey.LadBillCreditID_int, TypeCode.Int32);
                UsedLadBillEntity.CompanyLadBillID_bint = (Int64?)Hepsa.Core.Common.PersentationController.GetEntityValue(_CompanyLadBillKey.CompanyLadBillID_bint, TypeCode.Int64);

                ////Check if number exist
                List <HPS.BLL.UsedLadBillBLL.BLLUsedLadBill_T> UsedLadBillList = UsedLadBillFactory.GetAllBy(HPS.BLL.UsedLadBillBLL.BLLUsedLadBill_T.UsedLadBill_TField.LadBillNumber_int, UsedLadBillEntity.LadBillNumber_int);
                if (UsedLadBillList.Count > 0)
                {
                    throw new ApplicationException("این شماره قبلاً اختصاص داده شده است");
                }

                string CompanyLadBilCondition = "[CompanyLadBill_T].[StartNumber_int]<=N'" + UsedLadBillEntity.LadBillNumber_int + "' and [CompanyLadBill_T].[EndNumber_int]>=N'" + UsedLadBillEntity.LadBillNumber_int + "' AND [CompanyLadBill_T].[Serial_nvc]='" + Serial_nvcTextBox.Text + "'";
                HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_TFactory CompanyLadBillFactory = new HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_TFactory();
                List <HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_T> CompanyLadBillList    = CompanyLadBillFactory.GetAllByCondition(CompanyLadBilCondition);
                if (CompanyLadBillList.Count == 0)
                {
                    throw new ApplicationException("این شماره مابین شماره های اختصاص داده شده به شرکت نمی باشد");
                }
                UsedLadBillFactory.BeginProc();
                UsedLadBillFactory.Insert(UsedLadBillEntity);
                UsedLadBillFactory.CommitProc();

                if (this._LadBillWithTrafficDataTable != null)
                {
                    DataRow[] dr = this._LadBillWithTrafficDataTable.Select("LadBillCreditID_int=" + Convert.ToString(LadBillCreditKey.LadBillCreditID_int));
                    if (dr != null && dr.Length > 0)
                    {
                        dr[0].Delete();
                        this._LadBillWithTrafficDataTable.AcceptChanges();
                    }
                }

                LadBillNumber_intNumericTextBox.Text = string.Empty;
                Comment_nvcTextBox.Text = string.Empty;
            }
            catch (Exception ex)
            {
                UsedLadBillFactory.RollBackProc();
                throw ex;
            }
        }
예제 #4
0
 private void LoadCompanyLadBill()
 {
     try
     {
         HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_TFactory CompanyLadBillFactory = new HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_TFactory();
         DataTable CompanyLadBillDataTable = new DataTable();
         CompanyLadBillFactory.GetAll(ref CompanyLadBillDataTable);
         this.CompanyLadBillGridView.DataSource = CompanyLadBillDataTable;
     }
     catch (System.Exception ex)
     {
         throw ex;
     }
 }
예제 #5
0
        private void UsedLadBillToolStripButton_Click(object sender, EventArgs e)
        {
            try
            {
                if (this.LadBillWithTrafficGridView.CurrentRow != null && CompanyLadBillGridView.CurrentRow != null)
                {
                    if (this.LadBillWithTrafficGridView.CurrentRow.Cells["LadBillCreditID_int"].Value != null && this.CompanyLadBillGridView.CurrentRow.Cells["CompanyLadBillID_bint"].Value != null)
                    {
                        HPS.BLL.UsedLadBillBLL.BLLUsedLadBill_T UsedLadBillEntity = new HPS.BLL.UsedLadBillBLL.BLLUsedLadBill_T();
                        UsedLadBillEntity.LadBillCreditID_int = (Int32)Hepsa.Core.Common.PersentationController.GetEntityValue(this.LadBillWithTrafficGridView.CurrentRow.Cells["LadBillCreditID_int"].Value, TypeCode.Int32);
                        HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_TKeys CompanyLadBillKey = new HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_TKeys();
                        CompanyLadBillKey.CompanyLadBillID_bint = (Int64)this.CompanyLadBillGridView.CurrentRow.Cells["CompanyLadBillID_bint"].Value;
                        //////////////

                        HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_TFactory CompanyLaddBillFactory = new HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_TFactory();
                        HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_T        CompanyLadBillEntity   = CompanyLaddBillFactory.GetBy((HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_TKeys)CompanyLadBillKey);

                        HPS.BLL.UsedLadBillBLL.BLLUsedLadBill_TFactory UsedLadBillFactory = new HPS.BLL.UsedLadBillBLL.BLLUsedLadBill_TFactory();
                        string    Condition             = "(CompanyLadBill_T.StartNumber_int=N'" + CompanyLadBillEntity.StartNumber_int + "') AND (UsedLadBill_T.Serial_nvc =N'" + CompanyLadBillEntity.Serial_nvc + "') ";
                        DataTable LadBillCountDataTable = new DataTable();
                        UsedLadBillFactory.GetCountByCondition(Condition, ref LadBillCountDataTable);
                        int LadBillCount = 0;
                        if (LadBillCountDataTable != null && LadBillCountDataTable.Rows.Count > 0)
                        {
                            LadBillCount = Convert.ToInt32(LadBillCountDataTable.Rows[0]["UsedLadbBillCount"].ToString());
                        }
                        int Count = (CompanyLadBillEntity.EndNumber_int - CompanyLadBillEntity.StartNumber_int);
                        if (!(Count - LadBillCount > 0))
                        {
                            throw new ApplicationException("تعداد بارنامه های داده شده به این شرکت به اتمام رسیده است");
                        }
                        else
                        {
                            UsedLadBillEntityForm UsedLadBill = new UsedLadBillEntityForm((DataTable)this.CompanyLadBillGridView.DataSource, (DataTable)LadBillWithTrafficGridView.DataSource, UsedLadBillEntity.LadBillCreditID_int, CompanyLadBillKey, Convert.ToString(this.LadBillWithTrafficGridView.CurrentRow.Cells["DriverName"].Value), Convert.ToString(this.LadBillWithTrafficGridView.CurrentRow.Cells["NumberPlate"].Value));
                            UsedLadBill.ShowDialog();
                        }
                    }
                    //LoadAllLadBill();
                }
                else
                {
                    throw new ApplicationException("اطلاع رسانی بار و اختصاص بارنامه مربوط خالی است");
                }
            }
            catch (Exception ex)
            {
                Hepsa.Core.Common.MessageBox.ErrorMessage(ex.Message);
            }
        }
예제 #6
0
 private void Show()
 {
     try
     {
         HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_TFactory CompanyLaddBillFactory = new HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_TFactory();
         HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_T        CompanyLadBillEntity   = CompanyLaddBillFactory.GetBy((HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_TKeys)_CompanyLadBillKey);
         Serial_nvcTextBox.Text      = Hepsa.Core.Common.PersentationController.GetEntityValue(CompanyLadBillEntity.Serial_nvc, TypeCode.String).ToString();
         StartNumber_intTextBox.Text = Convert.ToString(Hepsa.Core.Common.PersentationController.GetEntityValue(CompanyLadBillEntity.StartNumber_int, TypeCode.Int64));
         DriverName_nvcTextBox.Text  = _DriverName;
         NumberPlate_nvcTextBox.Text = _NumberPlate;
     }
     catch (Exception ex)
     {
         Hepsa.Core.Common.MessageBox.ErrorMessage(ex.Message);
     }
 }
예제 #7
0
 protected override void ShowForm()
 {
     this.FillCombo();
     HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_TFactory CompanyLadBillFactory = new HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_TFactory();
     HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_T        CompanyLadBillEntity  = CompanyLadBillFactory.GetBy((HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_TKeys)Key);
     if (CompanyLadBillEntity == null)
     {
         throw new HPS.Exceptions.CompanyLadBillNotFound();
     }
     Hepsa.Core.Common.PersentationController.SetComboBoxValue(ref CompanyID_intComboBox, CompanyLadBillEntity.CompanyID_int, TypeCode.Int32);
     CompanyCode_nvcTextBox.Text        = Convert.ToString(Hepsa.Core.Common.PersentationController.GetEntityValue(CompanyLadBillEntity.CompanyCode_nvc, TypeCode.String));
     Date_nvcTextBox.Text               = Convert.ToString(Hepsa.Core.Common.PersentationController.GetEntityValue(CompanyLadBillEntity.Date_nvc, TypeCode.String));
     Serial_nvcTextBox.Text             = Convert.ToString(Hepsa.Core.Common.PersentationController.GetEntityValue(CompanyLadBillEntity.Serial_nvc, TypeCode.String));
     StartNumber_intNumericTextBox.Text = Hepsa.Core.Common.PersentationController.GetEntityValue(CompanyLadBillEntity.StartNumber_int, TypeCode.Int32).ToString();
     EndNumber_intNumericTextBox.Text   = Hepsa.Core.Common.PersentationController.GetEntityValue(CompanyLadBillEntity.EndNumber_int, TypeCode.Int32).ToString();
     AssignmentNumber_nvcTextBox.Text   = Convert.ToString(Hepsa.Core.Common.PersentationController.GetEntityValue(CompanyLadBillEntity.AssignmentNumber_nvc, TypeCode.String));
     DeliveryUserCode_nvcTextBox.Text   = Convert.ToString(Hepsa.Core.Common.PersentationController.GetEntityValue(CompanyLadBillEntity.DeliveryUserCode_nvc, TypeCode.String));
 }
예제 #8
0
        protected override void Edit()
        {
            HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_TFactory CompanyLadBillFactory = new HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_TFactory();
            try
            {
                HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_T CompanyLadBillEntity = new HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_T();
                CompanyLadBillEntity.CompanyID_int        = (Int32)Hepsa.Core.Common.PersentationController.GetEntityValue(CompanyID_intComboBox.SelectedValue, TypeCode.Int32);
                CompanyLadBillEntity.CompanyCode_nvc      = Hepsa.Core.Common.PersentationController.GetEntityValue(CompanyCode_nvcTextBox.Text, TypeCode.String).ToString();
                CompanyLadBillEntity.Date_nvc             = Hepsa.Core.Common.PersentationController.GetEntityValue(Date_nvcTextBox.Text, TypeCode.String).ToString();
                CompanyLadBillEntity.Serial_nvc           = Hepsa.Core.Common.PersentationController.GetEntityValue(Serial_nvcTextBox.Text, TypeCode.String).ToString();
                CompanyLadBillEntity.StartNumber_int      = (Int32)Hepsa.Core.Common.PersentationController.GetEntityValue(StartNumber_intNumericTextBox.NumericText, TypeCode.Int32);
                CompanyLadBillEntity.EndNumber_int        = (Int32)Hepsa.Core.Common.PersentationController.GetEntityValue(EndNumber_intNumericTextBox.NumericText, TypeCode.Int32);
                CompanyLadBillEntity.AssignmentNumber_nvc = Hepsa.Core.Common.PersentationController.GetEntityValue(AssignmentNumber_nvcTextBox.Text, TypeCode.String).ToString();
                CompanyLadBillEntity.DeliveryUserCode_nvc = Hepsa.Core.Common.PersentationController.GetEntityValue(DeliveryUserCode_nvcTextBox.Text, TypeCode.String).ToString();

                if (Hepsa.Core.Common.MessageBox.ConfirmMessage(HPS.Exceptions.ExceptionCs.EditMessage) == true)
                {
                    CompanyLadBillFactory.BeginProc();
                    CompanyLadBillFactory.Update(CompanyLadBillEntity, (HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_TKeys)Key);
                    CompanyLadBillFactory.CommitProc();
                    if (DataTable != null)
                    {
                        DataRow[] dr = DataTable.Select(HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_T.CompanyLadBill_TField.CompanyLadBillID_bint.ToString() + "='" + ((HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_TKeys)Key).CompanyLadBillID_bint.ToString() + "'");
                        if (dr.Length > 0)
                        {
                            dr[0]["CompanyID_intCompany_nvc"] = Hepsa.Core.Common.PersentationController.GetComboBoxDisplayMember(CompanyID_intComboBox);
                            dr[0][HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_T.CompanyLadBill_TField.CompanyCode_nvc.ToString()]      = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(CompanyLadBillEntity.CompanyCode_nvc, TypeCode.String);
                            dr[0][HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_T.CompanyLadBill_TField.Date_nvc.ToString()]             = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(CompanyLadBillEntity.Date_nvc, TypeCode.String);
                            dr[0][HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_T.CompanyLadBill_TField.Serial_nvc.ToString()]           = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(CompanyLadBillEntity.Serial_nvc, TypeCode.String);
                            dr[0][HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_T.CompanyLadBill_TField.StartNumber_int.ToString()]      = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(CompanyLadBillEntity.StartNumber_int, TypeCode.Int32);
                            dr[0][HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_T.CompanyLadBill_TField.EndNumber_int.ToString()]        = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(CompanyLadBillEntity.EndNumber_int, TypeCode.Int32);
                            dr[0][HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_T.CompanyLadBill_TField.AssignmentNumber_nvc.ToString()] = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(CompanyLadBillEntity.AssignmentNumber_nvc, TypeCode.String);
                            dr[0][HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_T.CompanyLadBill_TField.DeliveryUserCode_nvc.ToString()] = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(CompanyLadBillEntity.DeliveryUserCode_nvc, TypeCode.String);
                        }
                        DataTable.AcceptChanges();
                    }
                }
            }
            catch (Exception ex)
            {
                CompanyLadBillFactory.RollBackProc();
                throw ex;
            }
        }
예제 #9
0
 private void LoadCompanyLadBill()
 {
     try
     {
         HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_TFactory CompanyLadBillFactory = new HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_TFactory();
         DataTable CompanyLadBillDataTable = new DataTable();
         string    Condition = string.Empty;
         if (HPS.Common.CurrentUser.user.CompanyID_int.HasValue)
         {
             Condition = "User_T.UserName_nvc = N'" + HPS.Common.CurrentUser.user.UserName_nvc + "'";
         }
         CompanyLadBillFactory.GetAllWithCompanyUser(Condition, ref CompanyLadBillDataTable);
         this.CompanyLadBillGridView.DataSource = CompanyLadBillDataTable;
     }
     catch (System.Exception ex)
     {
         throw ex;
     }
 }
예제 #10
0
        protected override void Insert()
        {
            HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_TFactory CompanyLadBillFactory = new HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_TFactory();
            try
            {
                HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_T CompanyLadBillEntity = new HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_T();
                CompanyLadBillEntity.CompanyID_int        = (Int32)Hepsa.Core.Common.PersentationController.GetEntityValue(CompanyID_intComboBox.SelectedValue, TypeCode.Int32);
                CompanyLadBillEntity.CompanyCode_nvc      = Hepsa.Core.Common.PersentationController.GetEntityValue(CompanyCode_nvcTextBox.Text, TypeCode.String).ToString();
                CompanyLadBillEntity.Date_nvc             = Hepsa.Core.Common.PersentationController.GetEntityValue(Date_nvcTextBox.Text, TypeCode.String).ToString();
                CompanyLadBillEntity.Serial_nvc           = Hepsa.Core.Common.PersentationController.GetEntityValue(Serial_nvcTextBox.Text, TypeCode.String).ToString();
                CompanyLadBillEntity.StartNumber_int      = (Int32)Hepsa.Core.Common.PersentationController.GetEntityValue(StartNumber_intNumericTextBox.NumericText, TypeCode.Int32);
                CompanyLadBillEntity.EndNumber_int        = (Int32)Hepsa.Core.Common.PersentationController.GetEntityValue(EndNumber_intNumericTextBox.NumericText, TypeCode.Int32);
                CompanyLadBillEntity.AssignmentNumber_nvc = Hepsa.Core.Common.PersentationController.GetEntityValue(AssignmentNumber_nvcTextBox.Text, TypeCode.String).ToString();
                CompanyLadBillEntity.DeliveryUserCode_nvc = Hepsa.Core.Common.PersentationController.GetEntityValue(DeliveryUserCode_nvcTextBox.Text, TypeCode.String).ToString();

                CompanyLadBillFactory.BeginProc();
                CompanyLadBillFactory.Insert(CompanyLadBillEntity);
                CompanyLadBillFactory.CommitProc();
                if (DataTable != null)
                {
                    DataRow dr = this.DataTable.NewRow();
                    dr[HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_T.CompanyLadBill_TField.CompanyLadBillID_bint.ToString()] = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(CompanyLadBillEntity.CompanyLadBillID_bint, TypeCode.Int64);
                    dr[HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_T.CompanyLadBill_TField.CompanyID_int.ToString()]         = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(CompanyLadBillEntity.CompanyID_int, TypeCode.Int32);
                    dr["CompanyID_intCompany_nvc"] = Hepsa.Core.Common.PersentationController.GetComboBoxDisplayMember(CompanyID_intComboBox);
                    dr[HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_T.CompanyLadBill_TField.CompanyCode_nvc.ToString()]      = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(CompanyLadBillEntity.CompanyCode_nvc, TypeCode.String);
                    dr[HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_T.CompanyLadBill_TField.Date_nvc.ToString()]             = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(CompanyLadBillEntity.Date_nvc, TypeCode.String);
                    dr[HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_T.CompanyLadBill_TField.Serial_nvc.ToString()]           = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(CompanyLadBillEntity.Serial_nvc, TypeCode.String);
                    dr[HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_T.CompanyLadBill_TField.StartNumber_int.ToString()]      = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(CompanyLadBillEntity.StartNumber_int, TypeCode.Int32);
                    dr[HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_T.CompanyLadBill_TField.EndNumber_int.ToString()]        = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(CompanyLadBillEntity.EndNumber_int, TypeCode.Int32);
                    dr[HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_T.CompanyLadBill_TField.AssignmentNumber_nvc.ToString()] = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(CompanyLadBillEntity.AssignmentNumber_nvc, TypeCode.String);
                    dr[HPS.BLL.CompanyLadBillBLL.BLLCompanyLadBill_T.CompanyLadBill_TField.DeliveryUserCode_nvc.ToString()] = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(CompanyLadBillEntity.DeliveryUserCode_nvc, TypeCode.String);

                    DataTable.Rows.Add(dr);
                    DataTable.AcceptChanges();
                }
                this.ClearForm(this);
            }
            catch (Exception ex)
            {
                CompanyLadBillFactory.RollBackProc();
                throw ex;
            }
        }