Ejemplo n.º 1
0
 public HPS.BLL.LadeCommentBLL.BLLLadeComment_T GetBy(HPS.BLL.LadeCommentBLL.BLLLadeComment_TKeys keys)
 {
     try
     {
         return(_dataObject.SelectByPrimaryKey(keys));
     }
     catch (System.Exception ex)
     {
         throw Hepsa.Core.Exception.HandleException.ChangeExceptionLanguage(ex, this);
     }
 }
Ejemplo n.º 2
0
 public void GetBy(HPS.BLL.LadeCommentBLL.BLLLadeComment_TKeys keys, ref System.Data.DataSet dataSet)
 {
     try
     {
         _dataObject.SelectByPrimaryKey(keys, ref dataSet);
     }
     catch (System.Exception ex)
     {
         throw Hepsa.Core.Exception.HandleException.ChangeExceptionLanguage(ex, this);
     }
 }
Ejemplo n.º 3
0
 public void Delete(HPS.BLL.LadeCommentBLL.BLLLadeComment_TKeys keys)
 {
     try
     {
         _dataObject.Delete(keys);
     }
     catch (System.Exception ex)
     {
         throw Hepsa.Core.Exception.HandleException.ChangeExceptionLanguage(ex, this);
     }
 }
Ejemplo n.º 4
0
        public void SelectByPrimaryKey(HPS.BLL.LadeCommentBLL.BLLLadeComment_TKeys businessObjectKey, ref System.Data.DataTable dataTable)
        {
            bool           ControlConnection = !(this.ConnectionState == System.Data.ConnectionState.Open);
            SqlDataAdapter sqlDataAdapter    = new System.Data.SqlClient.SqlDataAdapter(this.Command);

            this.Command.CommandText = "[sp_LadeComment_T_SelectByPrimaryKey]";
            this.Command.CommandType = CommandType.StoredProcedure;

            try{
                this.Command.Parameters.Clear();

                SqlParameter LadeCommentID_int = new SqlParameter();
                LadeCommentID_int.ParameterName = "@LadeCommentID_int";
                LadeCommentID_int.SqlDbType     = SqlDbType.Int;
                LadeCommentID_int.Direction     = ParameterDirection.Input;
                LadeCommentID_int.IsNullable    = false;
                LadeCommentID_int.Value         = businessObjectKey.LadeCommentID_int;
                this.Command.Parameters.Add(LadeCommentID_int);



                if (ControlConnection)
                {
                    this.BeginTransaction();
                }

                sqlDataAdapter.Fill(dataTable);

                if (ControlConnection)
                {
                    this.Commit();
                }
            }
            catch (System.Exception ex) {
                if (ControlConnection)
                {
                    this.RollBack();
                }
                throw ex;
            }
        }
Ejemplo n.º 5
0
        public void Update(HPS.BLL.LadeCommentBLL.BLLLadeComment_T businessObject, HPS.BLL.LadeCommentBLL.BLLLadeComment_TKeys businessObjectKey)
        {
            try
            {
                HPS.BLL.LadeCommentBLL.BLLLadeComment_T tmpBill = this.GetBy(businessObjectKey);
                List <string> Except = new List <string>();
                if (businessObject.LadeCommentID_int == businessObjectKey.LadeCommentID_int)
                {
                    Except.Add("UniqueLadeCommentID_int");
                }
                if (businessObject.LadeComment_nvc == tmpBill.LadeComment_nvc)
                {
                    Except.Add("UniqueLadeComment_nvc");
                }
                if (Except.Count > 0)
                {
                    if (businessObject.IsValid(Hepsa.Core.Validation.ValidationExceptionType.Except, Except.ToArray()) == false)
                    {
                        throw new Hepsa.Core.Validation.InvalidBusinessObjectException(businessObject.BrokenRulesList().ToString());
                    }
                }
                else
                {
                    if (businessObject.IsValid() == false)
                    {
                        throw new Hepsa.Core.Validation.InvalidBusinessObjectException(businessObject.BrokenRulesList().ToString());
                    }
                }

                _dataObject.Update(businessObject, businessObjectKey);
            }
            catch (System.Exception ex)
            {
                throw Hepsa.Core.Exception.HandleException.ChangeExceptionLanguage(ex, this);
            }
        }
Ejemplo n.º 6
0
        public void Update(HPS.BLL.LadeCommentBLL.BLLLadeComment_T businessObject, HPS.BLL.LadeCommentBLL.BLLLadeComment_TKeys businessObjectKey)
        {
            bool ControlConnection = !(this.ConnectionState == System.Data.ConnectionState.Open);

            this.Command.CommandText = "[sp_LadeComment_T_Update]";
            this.Command.CommandType = CommandType.StoredProcedure;

            try{
                this.Command.Parameters.Clear();

                SqlParameter LadeComment_nvc = new SqlParameter();
                LadeComment_nvc.ParameterName = "@LadeComment_nvc";
                LadeComment_nvc.SqlDbType     = SqlDbType.NVarChar;
                LadeComment_nvc.Direction     = ParameterDirection.Input;
                LadeComment_nvc.IsNullable    = false;
                LadeComment_nvc.Value         = businessObject.LadeComment_nvc;
                this.Command.Parameters.Add(LadeComment_nvc);

                SqlParameter UserGroupID_int = new SqlParameter();
                UserGroupID_int.ParameterName = "@UserGroupID_int";
                UserGroupID_int.SqlDbType     = SqlDbType.Int;
                UserGroupID_int.Direction     = ParameterDirection.Input;
                UserGroupID_int.IsNullable    = false;
                if (businessObject.UserGroupID_int.HasValue == false)
                {
                    UserGroupID_int.Value = DBNull.Value;
                }
                else
                {
                    UserGroupID_int.Value = businessObject.UserGroupID_int;
                }
                this.Command.Parameters.Add(UserGroupID_int);


                SqlParameter pk_LadeCommentID_int = new SqlParameter();
                pk_LadeCommentID_int.ParameterName = "@pk_LadeCommentID_int";
                pk_LadeCommentID_int.SqlDbType     = SqlDbType.Int;
                pk_LadeCommentID_int.Direction     = ParameterDirection.Input;
                pk_LadeCommentID_int.IsNullable    = false;
                pk_LadeCommentID_int.Value         = businessObjectKey.LadeCommentID_int;
                this.Command.Parameters.Add(pk_LadeCommentID_int);



                if (ControlConnection)
                {
                    this.BeginTransaction();
                }

                this.Command.ExecuteNonQuery();

                if (ControlConnection)
                {
                    this.Commit();
                }
            }
            catch (System.Exception ex) {
                if (ControlConnection)
                {
                    this.RollBack();
                }
                throw ex;
            }
        }
Ejemplo n.º 7
0
 public LadeCommentEntityForm(Hepsa.Core.PL.BaseEntityParentForm.enmState State, DataTable DataTable, HPS.BLL.LadeCommentBLL.BLLLadeComment_TKeys Key)
     : base(State, DataTable, Key)
 {
     InitializeComponent();
 }