public void ApprovalManagementUpdate()
        {
            using (SqlConnection Connection = new SqlConnection(ConfigurationManager.AppSettings["WebApplication"]))
            {
                using (SqlCommand Command = new SqlCommand("BonusPlan.ApprovalManagementUpdate", Connection))
                {
                    Command.CommandType    = CommandType.StoredProcedure;
                    Command.CommandTimeout = 600;

                    Command.Parameters.Add("@PaymentToApprovalID", SqlDbType.Int);
                    Command.Parameters["@PaymentToApprovalID"].Value = PaymentToApprovalID.NullIfEmpty();

                    Command.Parameters.Add("@UsernameAlternate", SqlDbType.VarChar);
                    Command.Parameters["@UsernameAlternate"].Value = UsernameAlternate.NullIfEmpty();

                    Command.Parameters.Add("@JobCategoryID", SqlDbType.Int);
                    Command.Parameters["@JobCategoryID"].Value = JobCategoryID.NullIfEmpty();

                    Command.Parameters.Add("@JobCategoryIDAlternate", SqlDbType.Int);
                    Command.Parameters["@JobCategoryIDAlternate"].Value = JobCategoryIDAlternate.NullIfEmpty();

                    Command.Parameters.Add("@Sort", SqlDbType.Int);
                    Command.Parameters["@Sort"].Value = Sort.NullIfEmpty();

                    Command.Parameters.Add("@ApproveFlg", SqlDbType.Int);
                    Command.Parameters["@ApproveFlg"].Value = ApproveFlg.NullIfEmpty();

                    Command.Parameters.Add("@DenyFlg", SqlDbType.Int);
                    Command.Parameters["@DenyFlg"].Value = DenyFlg.NullIfEmpty();

                    Command.Parameters.Add("@ExceptionFlg", SqlDbType.Int);
                    Command.Parameters["@ExceptionFlg"].Value = ExceptionFlg.NullIfEmpty();

                    Command.Parameters.Add("@ExceptionNote", SqlDbType.VarChar);
                    Command.Parameters["@ExceptionNote"].Value = ExceptionNote.NullIfEmpty();

                    Command.Parameters.Add("@AdministrationNote", SqlDbType.VarChar);
                    Command.Parameters["@AdministrationNote"].Value = AdministrationNote.NullIfEmpty();

                    Command.Parameters.Add("@OverrideFlg", SqlDbType.Int);
                    Command.Parameters["@OverrideFlg"].Value = OverrideFlg.NullIfEmpty();

                    Command.Parameters.Add("@ModifyBy", SqlDbType.VarChar);
                    Command.Parameters["@ModifyBy"].Value = Audit.ModifyBy.NullIfEmpty();

                    Command.Parameters.Add("@ActiveFlg", SqlDbType.Int);
                    Command.Parameters["@ActiveFlg"].Value = Audit.ActiveFlg.NullIfEmpty();

                    Connection.Open();
                    Command.ExecuteNonQuery();
                }
            }
        }
        public DataSet ApprovalManagementDetailGet()
        {
            DataSet dsApproval = new DataSet();

            using (SqlConnection Connection = new SqlConnection(ConfigurationManager.AppSettings["WebApplication"]))
            {
                using (SqlCommand Command = new SqlCommand("BonusPlan.ApprovalManagementDetailGet", Connection))
                {
                    Command.CommandType    = CommandType.StoredProcedure;
                    Command.CommandTimeout = 600;

                    Command.Parameters.Add("@PaymentToApprovalID", SqlDbType.Int);
                    Command.Parameters["@PaymentToApprovalID"].Value = PaymentToApprovalID.NullIfEmpty();

                    using (SqlDataAdapter DataAdapter = new SqlDataAdapter(Command))
                    {
                        DataAdapter.Fill(dsApproval);

                        if (dsApproval.HasRows())
                        {
                            PaymentToApprovalID    = dsApproval.Tables[0].Rows[0]["PaymentToApprovalID"].ToString();
                            BonusPlanID            = dsApproval.Tables[0].Rows[0]["BonusPlanID"].ToString();
                            JobCategoryID          = dsApproval.Tables[0].Rows[0]["JobCategoryID"].ToString();
                            JobCategoryIDAlternate = dsApproval.Tables[0].Rows[0]["JobCategoryIDAlternate"].ToString();
                            UsernameAlternate      = dsApproval.Tables[0].Rows[0]["UsernameAlternate"].ToString();
                            //CriteriaValue = dsApproval.Tables[0].Rows[0]["CriteriaValue"].ToString();
                            Sort               = dsApproval.Tables[0].Rows[0]["Sort"].ToString();
                            ApproveFlg         = dsApproval.Tables[0].Rows[0]["ApproveFlg"].ToString();
                            DenyFlg            = dsApproval.Tables[0].Rows[0]["DenyFlg"].ToString();
                            ExceptionFlg       = dsApproval.Tables[0].Rows[0]["ExceptionFlg"].ToString();
                            OverrideFlg        = dsApproval.Tables[0].Rows[0]["OverrideFlg"].ToString();
                            ExceptionNote      = dsApproval.Tables[0].Rows[0]["ExceptionNote"].ToString();
                            AdministrationNote = dsApproval.Tables[0].Rows[0]["AdministrationNote"].ToString();
                            Audit.CreateBy     = dsApproval.Tables[0].Rows[0]["CreateBy"].ToString();
                            Audit.CreateDt     = dsApproval.Tables[0].Rows[0]["CreateDt"].ToString();
                            Audit.ModifyBy     = dsApproval.Tables[0].Rows[0]["ModifyBy"].ToString();
                            Audit.ModifyDt     = dsApproval.Tables[0].Rows[0]["ModifyDt"].ToString();
                            Audit.ActiveFlg    = dsApproval.Tables[0].Rows[0]["ActiveFlg"].ToString();
                        }
                    }
                }
            }

            return(dsApproval);
        }