コード例 #1
0
 protected void btn_PrintSave_Click(object sender, EventArgs e)
 {
     lblSaveFlag.Text = "SavePrint";
     if (lblEdit.Text == "Edit")
     {
         KycFormSave();
         Page.ClientScript.RegisterStartupScript(
             this.GetType(), "OpenWindow", "window.open('KycFormReport.aspx?KycNo=" + lblAutoExtend.Text + "');", true);
         lblAutoExtend.Text = "";
         return;
     }
     else
     {
         OtherBAL  ObjBal = new OtherBAL();
         DataSet   ds     = ObjBal.Idv_Chetana_Get_KycForm_GetMasterCust(txtCustCode.Text, Convert.ToInt32(Session["FY"]), "ChkCode");
         DataTable dt     = ds.Tables[0];
         if (dt.Rows.Count > 0)
         {
             ModalPopupExtenderNew.Show();
             return;
         }
         else
         {
             KycFormSave();
             Page.ClientScript.RegisterStartupScript(
                 this.GetType(), "OpenWindow", "window.open('KycFormReport.aspx?KycNo=" + KycMax.ToString() + "');", true);
             lblAutoExtend.Text = "";
         }
     }
 }
コード例 #2
0
    private void KycFormSave()
    {
        OtherBAL.KycForm_Property ObjProperty = new OtherBAL.KycForm_Property();
        OtherBAL ObjBal = new OtherBAL();

        #region Checkbox Values Get
        string rbtnval = "";
        if (rbtnChr.Checked == true)
        {
            rbtnval = "CH RECD";
        }
        else if (rbtnSch.Checked == true)
        {
            rbtnval = "SCH";
        }
        else if (rbtnWcp.Checked == true)
        {
            rbtnval = "WCP";
        }
        else if (rbtnCod.Checked == true)
        {
            rbtnval = "COD";
        }
        else
        {
            rbtnval = "";
        }
        if (txtDisYear.Text == "")
        {
            txtDisYear.Text = "0";
        }
        if (txtTitlesYear.Text == "")
        {
            txtTitlesYear.Text = "0";
        }
        #endregion
        //string OrderDate = txtOrderRecdDate.Text.Split('/')[1] + "/" + txtOrderRecdDate.Text.Split('/')[0] + "/" + txtOrderRecdDate.Text.Split('/')[2];
        ObjProperty.KycNo            = Convert.ToInt32(lblKycId.Text);
        ObjProperty.CustCode         = txtCustCode.Text.Split(':')[0].ToString();
        ObjProperty.CustName         = txtCustName.Text;
        ObjProperty.CustAdd          = txtCustAdd.Text;
        ObjProperty.Area             = txtArea.Text;
        ObjProperty.City             = txtCity.Text;
        ObjProperty.ZipCode          = txtZipCode.Text;
        ObjProperty.ZoneCode         = txtZoneCode.Text;
        ObjProperty.Telepone         = txtTelephone.Text;
        ObjProperty.MobileNo         = txtMobile.Text;
        ObjProperty.IfBookseller     = rbtnval;
        ObjProperty.DelAdd           = txtDelAdd.Text;
        ObjProperty.Transport        = txtTransport.SelectedValue;
        ObjProperty.DisCurrentYear   = float.Parse(txtDisYear.Text);
        ObjProperty.TitleCurrentYear = Convert.ToInt32(txtTitlesYear.Text);

        ObjProperty.PrevDic   = float.Parse(lblprvyeardisc.Text);
        ObjProperty.PrevTitle = Convert.ToInt32(lblpreyeartitles.Text == ""?"0":lblpreyeartitles.Text);

        ObjProperty.ChkSchemeLetter = Convert.ToInt32(ChkScheme.Checked);
        ObjProperty.ChkAddCommFrm   = Convert.ToInt32(ChkAddComminsion.Checked);
        ObjProperty.ChkDisForm      = Convert.ToInt32(ChkDisForm.Checked);
        ObjProperty.Remark          = txtRemrk.Text;
        ObjProperty.FY        = Convert.ToInt32(Session["FY"]);
        ObjProperty.CreatedBy = Session["UserName"].ToString();
        ObjProperty.OS        = Convert.ToSingle(lblOS.Text);
        ObjProperty.R1        = lblAvg.Text;
        ObjProperty.R2        = "";
        ObjProperty.R3        = "";
        ObjProperty.R4        = "";
        ObjBal.Idv_Chetana_Save_KycForm(ObjProperty, out KycId, out KycMax);
        if (lblEdit.Text == "Edit")
        {
            Message("Record save successfully Kyc Form No is " + KycId.ToString());
            lblKycId.Text     = "0";
            lblEdit.Text      = "";
            btnDelete.Visible = false;
            Clear();
        }
        else
        {
            Message("Record save successfully Kyc Form No is " + KycMax.ToString());
            lblKycId.Text     = "0";
            lblEdit.Text      = "";
            btnDelete.Visible = false;
            Clear();
        }
    }
コード例 #3
0
 protected void btnbtnExsist_Click(object sender, EventArgs e)
 {
     if (lblSaveFlag.Text == "Save")
     {
         KycFormSave();
         lblAutoExtend.Text = "";
         ModalPopupExtenderNew.Hide();
     }
     else
     {
         KycFormSave();
         ModalPopupExtenderNew.Hide();
         // Response.Redirect("KycFormReport.aspx?KycNo=" + Convert.ToInt32(KycId));
         Page.ClientScript.RegisterStartupScript(
             this.GetType(), "OpenWindow", "window.open('KycFormReport.aspx?KycNo=" + KycMax.ToString() + "');", true);
         lblAutoExtend.Text = "";
     }
 }