Exemple #1
0
        protected override void Edit()
        {
            HPS.BLL.LadBillCancelCommentBLL.BLLLadBillCancelComment_TFactory LadBillCancelCommentFactory = new HPS.BLL.LadBillCancelCommentBLL.BLLLadBillCancelComment_TFactory();
            try
            {
                HPS.BLL.LadBillCancelCommentBLL.BLLLadBillCancelComment_T LadBillCancelCommentEntity = new HPS.BLL.LadBillCancelCommentBLL.BLLLadBillCancelComment_T();
                LadBillCancelCommentEntity.LadbillCancelComment_nvc = Hepsa.Core.Common.PersentationController.GetEntityValue(LadbillCancelComment_nvcTextBox.Text, TypeCode.String).ToString();
                LadBillCancelCommentEntity.UserGroupID_int          = (Nullable <Int32>)Hepsa.Core.Common.PersentationController.GetEntityValue(UserGroupID_intComboBox.SelectedValue, TypeCode.Int32);

                if (Hepsa.Core.Common.MessageBox.ConfirmMessage(HPS.Exceptions.ExceptionCs.EditMessage) == true)
                {
                    LadBillCancelCommentFactory.BeginProc();
                    LadBillCancelCommentFactory.Update(LadBillCancelCommentEntity, (HPS.BLL.LadBillCancelCommentBLL.BLLLadBillCancelComment_TKeys)Key);
                    LadBillCancelCommentFactory.CommitProc();
                    if (DataTable != null)
                    {
                        DataRow[] dr = DataTable.Select(HPS.BLL.LadBillCancelCommentBLL.BLLLadBillCancelComment_T.LadBillCancelComment_TField.LadBillCancelCommentID_int.ToString() + "='" + ((HPS.BLL.LadBillCancelCommentBLL.BLLLadBillCancelComment_TKeys)Key).LadBillCancelCommentID_int.ToString() + "'");
                        if (dr.Length > 0)
                        {
                            dr[0][HPS.BLL.LadBillCancelCommentBLL.BLLLadBillCancelComment_T.LadBillCancelComment_TField.LadbillCancelComment_nvc.ToString()] = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(LadBillCancelCommentEntity.LadbillCancelComment_nvc, TypeCode.String);
                            dr[0]["UserGroupID_intUserGroup_nvc"] = Hepsa.Core.Common.PersentationController.GetComboBoxDisplayMember(UserGroupID_intComboBox);
                        }
                        DataTable.AcceptChanges();
                    }
                }
            }
            catch (Exception ex)
            {
                LadBillCancelCommentFactory.RollBackProc();
                throw ex;
            }
        }
Exemple #2
0
        private void DeleteButton_Click(object sender, EventArgs e)
        {
            HPS.BLL.LadBillCancelCommentBLL.BLLLadBillCancelComment_TFactory LadBillCancelCommentFactory = new HPS.BLL.LadBillCancelCommentBLL.BLLLadBillCancelComment_TFactory();

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


                HPS.BLL.LadBillCancelCommentBLL.BLLLadBillCancelComment_TFactory LadBillCancelComment_TFactory = new HPS.BLL.LadBillCancelCommentBLL.BLLLadBillCancelComment_TFactory();
                HPS.BLL.LadBillCancelCommentBLL.BLLLadBillCancelComment_TKeys    LadBillCancelCommentKey       = new HPS.BLL.LadBillCancelCommentBLL.BLLLadBillCancelComment_TKeys();

                LadBillCancelCommentKey.LadBillCancelCommentID_int = (Int32)LadBillCancelCommentGridView.CurrentRow.Cells["colLadBillCancelCommentID_int"].Value;
                LadBillCancelCommentFactory.Delete(LadBillCancelCommentKey);

                DataRow[] dr = ((DataTable)this.LadBillCancelCommentGridView.DataSource).Select(HPS.BLL.LadBillCancelCommentBLL.BLLLadBillCancelComment_T.LadBillCancelComment_TField.LadBillCancelCommentID_int.ToString() + "='" + LadBillCancelCommentKey.LadBillCancelCommentID_int.ToString() + "'");
                if (dr.Length > 0)
                {
                    dr[0].Delete();
                }
                ((DataTable)this.LadBillCancelCommentGridView.DataSource).AcceptChanges();
            }

            catch (Exception ex)
            {
                Hepsa.Core.Common.MessageBox.ErrorMessage(ex.Message);
            }
        }
Exemple #3
0
        protected override void Insert()
        {
            HPS.BLL.LadBillCancelCommentBLL.BLLLadBillCancelComment_TFactory LadBillCancelCommentFactory = new HPS.BLL.LadBillCancelCommentBLL.BLLLadBillCancelComment_TFactory();
            try
            {
                HPS.BLL.LadBillCancelCommentBLL.BLLLadBillCancelComment_T LadBillCancelCommentEntity = new HPS.BLL.LadBillCancelCommentBLL.BLLLadBillCancelComment_T();
                LadBillCancelCommentEntity.LadbillCancelComment_nvc = Hepsa.Core.Common.PersentationController.GetEntityValue(LadbillCancelComment_nvcTextBox.Text, TypeCode.String).ToString();
                LadBillCancelCommentEntity.UserGroupID_int          = (Nullable <Int32>)Hepsa.Core.Common.PersentationController.GetEntityValue(UserGroupID_intComboBox.SelectedValue, TypeCode.Int32);

                LadBillCancelCommentFactory.BeginProc();
                LadBillCancelCommentFactory.Insert(LadBillCancelCommentEntity);
                LadBillCancelCommentFactory.CommitProc();
                if (DataTable != null)
                {
                    DataRow dr = this.DataTable.NewRow();
                    dr[HPS.BLL.LadBillCancelCommentBLL.BLLLadBillCancelComment_T.LadBillCancelComment_TField.LadBillCancelCommentID_int.ToString()] = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(LadBillCancelCommentEntity.LadBillCancelCommentID_int, TypeCode.Int32);
                    dr[HPS.BLL.LadBillCancelCommentBLL.BLLLadBillCancelComment_T.LadBillCancelComment_TField.LadbillCancelComment_nvc.ToString()]   = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(LadBillCancelCommentEntity.LadbillCancelComment_nvc, TypeCode.String);
                    dr[HPS.BLL.LadBillCancelCommentBLL.BLLLadBillCancelComment_T.LadBillCancelComment_TField.UserGroupID_int.ToString()]            = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(LadBillCancelCommentEntity.UserGroupID_int, TypeCode.Int32);
                    dr["UserGroupID_intUserGroup_nvc"] = Hepsa.Core.Common.PersentationController.GetComboBoxDisplayMember(UserGroupID_intComboBox);

                    DataTable.Rows.Add(dr);
                    DataTable.AcceptChanges();
                }
                this.ClearForm(this);
            }
            catch (Exception ex)
            {
                LadBillCancelCommentFactory.RollBackProc();
                throw ex;
            }
        }
Exemple #4
0
        protected override void Delete()
        {
            HPS.BLL.LadBillCancelCommentBLL.BLLLadBillCancelComment_TFactory LadBillCancelCommentFactory = new HPS.BLL.LadBillCancelCommentBLL.BLLLadBillCancelComment_TFactory();

            try
            {
                if (Hepsa.Core.Common.MessageBox.ConfirmMessage(HPS.Exceptions.ExceptionCs.DeleteMessage) == true)
                {
                    LadBillCancelCommentFactory.BeginProc();
                    LadBillCancelCommentFactory.Delete((HPS.BLL.LadBillCancelCommentBLL.BLLLadBillCancelComment_TKeys)Key);
                    LadBillCancelCommentFactory.CommitProc();
                    if (DataTable != null)
                    {
                        DataRow[] dr = DataTable.Select(HPS.BLL.LadBillCancelCommentBLL.BLLLadBillCancelComment_T.LadBillCancelComment_TField.LadBillCancelCommentID_int.ToString() + "='" + ((HPS.BLL.LadBillCancelCommentBLL.BLLLadBillCancelComment_TKeys)Key).LadBillCancelCommentID_int.ToString() + "'");
                        if (dr.Length > 0)
                        {
                            dr[0].Delete();
                        }
                        DataTable.AcceptChanges();
                    }
                    this.Close();
                }
            }
            catch (Exception ex)
            {
                LadBillCancelCommentFactory.RollBackProc();
                throw ex;
            }
        }
Exemple #5
0
        private void LoadCheckListBox()
        {
            HPS.BLL.LadBillCancelCommentBLL.BLLLadBillCancelComment_TFactory LadBillCancelCommentFactory = new HPS.BLL.LadBillCancelCommentBLL.BLLLadBillCancelComment_TFactory();
            DataTable LadBillCreditCancelDataTable = new DataTable();

            try
            {
                this.LadBillCreditCancelCommentID_intCheckedListBox.Items.Clear();

                List <HPS.BLL.LadBillCancelCommentBLL.BLLLadBillCancelComment_T> lst = LadBillCancelCommentFactory.GetAll();
                if (lst != null && lst.Count > 0)
                {
                    foreach (HPS.BLL.LadBillCancelCommentBLL.BLLLadBillCancelComment_T itm in lst)
                    {
                        this.LadBillCreditCancelCommentID_intCheckedListBox.Items.Add(itm, false);
                    }
                }
                this.LadBillCreditCancelCommentID_intCheckedListBox.DisplayMember = HPS.BLL.LadBillCancelCommentBLL.BLLLadBillCancelComment_T.LadBillCancelComment_TField.LadbillCancelComment_nvc.ToString();
                this.LadBillCreditCancelCommentID_intCheckedListBox.ValueMember   = HPS.BLL.LadBillCancelCommentBLL.BLLLadBillCancelComment_T.LadBillCancelComment_TField.LadBillCancelCommentID_int.ToString();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemple #6
0
 protected override void ShowForm()
 {
     this.FillCombo();
     HPS.BLL.LadBillCancelCommentBLL.BLLLadBillCancelComment_TFactory LadBillCancelCommentFactory = new HPS.BLL.LadBillCancelCommentBLL.BLLLadBillCancelComment_TFactory();
     HPS.BLL.LadBillCancelCommentBLL.BLLLadBillCancelComment_T        LadBillCancelCommentEntity  = LadBillCancelCommentFactory.GetBy((HPS.BLL.LadBillCancelCommentBLL.BLLLadBillCancelComment_TKeys)Key);
     if (LadBillCancelCommentEntity == null)
     {
         throw new HPS.Exceptions.LadBillCancelCommentNotFound();
     }
     LadbillCancelComment_nvcTextBox.Text = Convert.ToString(Hepsa.Core.Common.PersentationController.GetEntityValue(LadBillCancelCommentEntity.LadbillCancelComment_nvc, TypeCode.String));
     Hepsa.Core.Common.PersentationController.SetComboBoxValue(ref UserGroupID_intComboBox, LadBillCancelCommentEntity.UserGroupID_int, TypeCode.Int32);
 }
Exemple #7
0
 private void LoadLadBillCancelComment()
 {
     try
     {
         HPS.BLL.LadBillCancelCommentBLL.BLLLadBillCancelComment_TFactory LadBillCancelCommentFactory = new HPS.BLL.LadBillCancelCommentBLL.BLLLadBillCancelComment_TFactory();
         DataTable LadBillCancelCommentDataTable = new DataTable();
         LadBillCancelCommentFactory.GetAll(ref LadBillCancelCommentDataTable);
         this.LadBillCancelCommentGridView.DataSource = LadBillCancelCommentDataTable;
     }
     catch (System.Exception ex)
     {
         throw ex;
     }
 }