Example #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     CheckCreatorKey();
     if (!Page.IsPostBack)
     {
         HLSSOAList.DataSource   = HLSSOA.HLSSOA_List();
         HLSSOAList.KeyFieldName = "PK";
         HLSSOAList.DataBind();
     }
 }
Example #2
0
        protected void OK_DELETE_Click(object sender, EventArgs e)
        {
            string        PK     = HLSSOAList.GetRowValues(HLSSOAList.FocusedRowIndex, "PK").ToString();
            string        delete = "DELETE FROM tbl_HLS_StatementOfAccount WHERE (PK = " + PK + ")";
            SqlConnection conn   = new SqlConnection(GlobalClass.SQLConnString());

            conn.Open();
            SqlCommand cmd = new SqlCommand(delete, conn);

            cmd.ExecuteNonQuery();
            conn.Close();

            BindHLSList();
        }
Example #3
0
 protected void HLSSOAList_CustomButtonCallback(object sender, ASPxGridViewCustomButtonCallbackEventArgs e)
 {
     if (e.ButtonID == "Delete")
     {
     }
     if (e.ButtonID == "Preview")
     {
         if (HLSSOAList.FocusedRowIndex > -1)
         {
             Session["HLS_Trans"]        = "View";
             Session["HLS_Add_Year"]     = HLSSOAList.GetRowValues(HLSSOAList.FocusedRowIndex, "Year").ToString();
             Session["HLS_Add_WeekNum"]  = HLSSOAList.GetRowValues(HLSSOAList.FocusedRowIndex, "WeekNum").ToString();
             Session["HLS_Add_CustCode"] = HLSSOAList.GetRowValues(HLSSOAList.FocusedRowIndex, "CustCode").ToString();
             Session["HLS_Add_SOANum"]   = HLSSOAList.GetRowValues(HLSSOAList.FocusedRowIndex, "SOANum").ToString();
             //Response.Redirect("hlsSOA_Add.aspx");
             Response.RedirectLocation = "hlsSOA_Add.aspx";
         }
     }
 }
Example #4
0
        protected void HLSSOAList_CustomButtonCallback(object sender, ASPxGridViewCustomButtonCallbackEventArgs e)
        {
            //MRPClass.PrintString(e.ButtonID);
            ASPxHiddenField InvoiceNum = HLSSOAList.FindHeaderTemplateControl(HLSSOAList.Columns[0], "HLSSOAInvHiddenVal") as ASPxHiddenField;

            if (e.ButtonID == "Delete")
            {
                //MRPClass.PrintString("pass delete");
                if (HLSSOAList.FocusedRowIndex > -1)
                {
                    string BillInvNum = HLSSOAList.GetRowValues(HLSSOAList.FocusedRowIndex, "BillingInv").ToString();
                    InvoiceNum["hidden_value"] = BillInvNum.Trim();
                    //if (BillInvNum.Trim() != "")
                    //{
                    //    txtError.Text = "Can't delete. Already invoiced. ";
                    //    PopUpControlError.HeaderText = "Error...";
                    //    PopUpControlError.ShowOnPageLoad = true;
                    //}
                    //else
                    //{
                    //    //MRPClass.PrintString("pass popup");
                    //    PopupDelete.HeaderText = "Confirm";
                    //    PopupDelete.ShowOnPageLoad = true;
                    //}
                }
            }
            if (e.ButtonID == "Preview")
            {
                if (HLSSOAList.FocusedRowIndex > -1)
                {
                    Session["HLS_Trans"]        = "View";
                    Session["HLS_Add_Year"]     = HLSSOAList.GetRowValues(HLSSOAList.FocusedRowIndex, "Year").ToString();
                    Session["HLS_Add_WeekNum"]  = HLSSOAList.GetRowValues(HLSSOAList.FocusedRowIndex, "WeekNum").ToString();
                    Session["HLS_Add_CustCode"] = HLSSOAList.GetRowValues(HLSSOAList.FocusedRowIndex, "CustCode").ToString();
                    Session["HLS_Add_SOANum"]   = HLSSOAList.GetRowValues(HLSSOAList.FocusedRowIndex, "SOANum").ToString();
                    //Response.Redirect("hlsSOA_Add.aspx");
                    Response.RedirectLocation = "hlsSOA_Add.aspx";
                }
            }
        }
Example #5
0
 private void BindHLSList()
 {
     HLSSOAList.DataSource   = HLSSOA.HLSSOA_List();
     HLSSOAList.KeyFieldName = "PK";
     HLSSOAList.DataBind();
 }