コード例 #1
0
        protected override void Insert()
        {
            HPS.BLL.LadeCancelCommentBLL.BLLLadeCancelComment_TFactory LadeCancelCommentFactory = new HPS.BLL.LadeCancelCommentBLL.BLLLadeCancelComment_TFactory();
            try
            {
                HPS.BLL.LadeCancelCommentBLL.BLLLadeCancelComment_T LadeCancelCommentEntity = new HPS.BLL.LadeCancelCommentBLL.BLLLadeCancelComment_T();
                LadeCancelCommentEntity.LadeCancelComment_nvc = Hepsa.Core.Common.PersentationController.GetEntityValue(LadeCancelComment_nvcTextBox.Text, TypeCode.String).ToString();
                LadeCancelCommentEntity.UserGroupID_int       = (Nullable <Int32>)Hepsa.Core.Common.PersentationController.GetEntityValue(UserGroupID_intComboBox.SelectedValue, TypeCode.Int32);

                LadeCancelCommentFactory.BeginProc();
                LadeCancelCommentFactory.Insert(LadeCancelCommentEntity);
                LadeCancelCommentFactory.CommitProc();
                if (DataTable != null)
                {
                    DataRow dr = this.DataTable.NewRow();
                    dr[HPS.BLL.LadeCancelCommentBLL.BLLLadeCancelComment_T.LadeCancelComment_TField.LadeCanceltCommentID_int.ToString()] = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(LadeCancelCommentEntity.LadeCanceltCommentID_int, TypeCode.Int32);
                    dr[HPS.BLL.LadeCancelCommentBLL.BLLLadeCancelComment_T.LadeCancelComment_TField.LadeCancelComment_nvc.ToString()]    = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(LadeCancelCommentEntity.LadeCancelComment_nvc, TypeCode.String);
                    dr[HPS.BLL.LadeCancelCommentBLL.BLLLadeCancelComment_T.LadeCancelComment_TField.UserGroupID_int.ToString()]          = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(LadeCancelCommentEntity.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)
            {
                LadeCancelCommentFactory.RollBackProc();
                throw ex;
            }
        }
コード例 #2
0
        protected override void Edit()
        {
            HPS.BLL.LadeCancelCommentBLL.BLLLadeCancelComment_TFactory LadeCancelCommentFactory = new HPS.BLL.LadeCancelCommentBLL.BLLLadeCancelComment_TFactory();
            try
            {
                HPS.BLL.LadeCancelCommentBLL.BLLLadeCancelComment_T LadeCancelCommentEntity = new HPS.BLL.LadeCancelCommentBLL.BLLLadeCancelComment_T();
                LadeCancelCommentEntity.LadeCancelComment_nvc = Hepsa.Core.Common.PersentationController.GetEntityValue(LadeCancelComment_nvcTextBox.Text, TypeCode.String).ToString();
                LadeCancelCommentEntity.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)
                {
                    LadeCancelCommentFactory.BeginProc();
                    LadeCancelCommentFactory.Update(LadeCancelCommentEntity, (HPS.BLL.LadeCancelCommentBLL.BLLLadeCancelComment_TKeys)Key);
                    LadeCancelCommentFactory.CommitProc();
                    if (DataTable != null)
                    {
                        DataRow[] dr = DataTable.Select(HPS.BLL.LadeCancelCommentBLL.BLLLadeCancelComment_T.LadeCancelComment_TField.LadeCanceltCommentID_int.ToString() + "='" + ((HPS.BLL.LadeCancelCommentBLL.BLLLadeCancelComment_TKeys)Key).LadeCanceltCommentID_int.ToString() + "'");
                        if (dr.Length > 0)
                        {
                            dr[0][HPS.BLL.LadeCancelCommentBLL.BLLLadeCancelComment_T.LadeCancelComment_TField.LadeCancelComment_nvc.ToString()] = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(LadeCancelCommentEntity.LadeCancelComment_nvc, TypeCode.String);
                            dr[0]["UserGroupID_intUserGroup_nvc"] = Hepsa.Core.Common.PersentationController.GetComboBoxDisplayMember(UserGroupID_intComboBox);
                        }
                        DataTable.AcceptChanges();
                    }
                }
            }
            catch (Exception ex)
            {
                LadeCancelCommentFactory.RollBackProc();
                throw ex;
            }
        }
コード例 #3
0
        protected override void Delete()
        {
            HPS.BLL.LadeCancelCommentBLL.BLLLadeCancelComment_TFactory LadeCancelCommentFactory = new HPS.BLL.LadeCancelCommentBLL.BLLLadeCancelComment_TFactory();

            try
            {
                if (Hepsa.Core.Common.MessageBox.ConfirmMessage(HPS.Exceptions.ExceptionCs.DeleteMessage) == true)
                {
                    LadeCancelCommentFactory.BeginProc();
                    LadeCancelCommentFactory.Delete((HPS.BLL.LadeCancelCommentBLL.BLLLadeCancelComment_TKeys)Key);
                    LadeCancelCommentFactory.CommitProc();
                    if (DataTable != null)
                    {
                        DataRow[] dr = DataTable.Select(HPS.BLL.LadeCancelCommentBLL.BLLLadeCancelComment_T.LadeCancelComment_TField.LadeCanceltCommentID_int.ToString() + "='" + ((HPS.BLL.LadeCancelCommentBLL.BLLLadeCancelComment_TKeys)Key).LadeCanceltCommentID_int.ToString() + "'");
                        if (dr.Length > 0)
                        {
                            dr[0].Delete();
                        }
                        DataTable.AcceptChanges();
                    }
                    this.Close();
                }
            }
            catch (Exception ex)
            {
                LadeCancelCommentFactory.RollBackProc();
                throw ex;
            }
        }