Esempio n. 1
0
        protected void drpState_SelectedIndexChanged(object sender, EventArgs e)
        {
            TaxMastDAL objTaxMastBLL = new TaxMastDAL();
            var        lst           = (IList)null;

            if (Convert.ToInt32(drpdownTaxType.SelectedValue) <= 0)
            {
                lst = objTaxMastBLL.SelectAllTaxByID(Convert.ToInt32(drpState.SelectedValue), cOMPiD);
            }
            else
            {
                lst = objTaxMastBLL.SelectAllTaxTypeByID(Convert.ToInt32(Convert.ToString(drpState.SelectedValue) == "" ? 0 : Convert.ToInt32(drpState.SelectedValue)), Convert.ToInt32(Convert.ToString(drpdownTaxType.SelectedValue) == "" ? 0 : Convert.ToInt32(drpdownTaxType.SelectedValue)), 1);
            }

            if (lst.Count > 0)
            {
                DivGridShow.Visible = true;
                objTaxMastBLL       = null;
                grdMain.DataSource  = lst;
                grdMain.DataBind();
            }
            else
            {
                this.BindGrid();
            }
            drpdownTaxType.Focus();
        }
Esempio n. 2
0
 protected void drpdownTaxType_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         if (drpdownTaxType.SelectedItem.Text.Trim() == "TDS")
         {
             ddlPANType.Enabled = txtLorryFrom.Enabled = txtlorryto.Enabled = chkCalOnDF.Enabled = true;
         }
         else
         {
             ddlPANType.Enabled = txtLorryFrom.Enabled = txtlorryto.Enabled = chkCalOnDF.Enabled = false;
         }
         if (drpdownTaxType.SelectedItem.Text.Trim() == "UGST" || drpdownTaxType.SelectedItem.Text.Trim() == "IGST" || drpdownTaxType.SelectedItem.Text.Trim() == "CGST" || drpdownTaxType.SelectedItem.Text.Trim() == "SGST")
         {
             ddlPANType.Enabled = txtLorryFrom.Enabled = txtlorryto.Enabled = chkCalOnDF.Enabled = drpState.Enabled = RequiredFieldValidator1.Enabled = false;
         }
         else
         {
             ddlPANType.Enabled = txtLorryFrom.Enabled = txtlorryto.Enabled = chkCalOnDF.Enabled = drpState.Enabled = RequiredFieldValidator1.Enabled = true;
         }
         TaxMastDAL objTaxMastBLL = new TaxMastDAL();
         var        lst           = objTaxMastBLL.SelectAllTaxTypeByID(Convert.ToInt32(Convert.ToString(drpState.SelectedValue) == "" ? 0 : Convert.ToInt32(drpState.SelectedValue)), Convert.ToInt32(Convert.ToString(drpdownTaxType.SelectedValue) == "" ? 0 : Convert.ToInt32(drpdownTaxType.SelectedValue)), 1);
         if (lst.Count > 0)
         {
             objTaxMastBLL       = null;
             DivGridShow.Visible = true;
             grdMain.DataSource  = lst;
             grdMain.DataBind();
         }
         else
         {
             this.BindGrid();
         }
     }
     catch (Exception Ex)
     {
     }
     txtDate.Focus();
 }