Esempio n. 1
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;
            }
        }
Esempio n. 2
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;
            }
        }
Esempio n. 3
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;
            }
        }