예제 #1
0
    private void SoInvoiceDetails(Int64 id, string SoInvoiceNum)
    {
        DataTable ds = new DataTable();

        ds = ClsAR.Get_ARDetails(id, SoInvoiceNum);
        GvwARDetails.DataSource = ds;
        GvwARDetails.DataBind();
    }
예제 #2
0
    private void GetSalesManager()
    {
        DataTable ds = new DataTable();

        try
        {
            ds = ClsAR.Get_SalesOrderForAR(Convert.ToDateTime(Txt_FromDate.Text.Trim()), Convert.ToDateTime(Txt_ToDate.Text.Trim()));
            GvwSalesManagerChecking.DataSource = ds;
            GvwSalesManagerChecking.DataBind();
            ViewState["Data"] = ds;
            ds.Dispose();
            if (ViewState["PageINdex"] != null)
            {
                GvwSalesManagerChecking.PageIndex = Convert.ToInt32(ViewState["PageINdex"].ToString());
            }
        }
        catch (Exception ex)
        {
        }
    }
예제 #3
0
 protected void BtnSave_Click(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(hidDetails_ID.Value))
     {
         string  asd    = hidDetails_ID.Value;
         decimal BalAmt = Convert.ToDecimal(HiddenFieldbal.Value.Trim()) - Convert.ToDecimal(TxtAmountReceived.Text.Trim());
         bool    result = ClsAR.Insert_AR_Details(Convert.ToInt32(asd), Convert.ToDateTime(TxtInvoiceDate.Text.Trim()), TxtInvoiceNo.Text.Trim(), txtnameofcust.Text.Trim(),
                                                  Convert.ToDecimal(TxtInvoiceAmount.Text.Trim()), Convert.ToDecimal(TxtAmountReceived.Text.Trim()), BalAmt,
                                                  TxtCreditPeriod.Text, Convert.ToInt32(TxtDays.Text.Trim()), Convert.ToInt32(Session["Id"]));
         if (result)
         {
             GetSalesManager();
             ScriptManager.RegisterStartupScript(this, typeof(Page), "Alert", "<script>alert('Saved Successfully...');</script>", false);
         }
         else
         {
             ScriptManager.RegisterStartupScript(this, typeof(Page), "Alert", "<script>alert('Failed...');</script>", false);
         }
     }
 }