Ejemplo n.º 1
0
 protected void ddlCliNm_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         BLAddInvoice blInv = new BLAddInvoice();
         string strClientName1 = Convert.ToString(ddlCliNm.SelectedItem.Text);
         SqlDataReader dr = blInv.getClIdByName(strClientName1);
         if (dr.HasRows)
         {
             dr.Read();
             lblCliId1.Text = dr.GetInt32(0).ToString();
         }
         dr.Close();
         fillgridService();
     }
     catch (Exception ex)
     {
         lblCatchError.Text = ex.Message.ToString();
     }
 }
Ejemplo n.º 2
0
        protected void drpdwnClientNm_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                int ClientId = 0;
                string ClNm = drpdwnClientNm.SelectedItem.Text;
                BLAddInvoice blAddCl = new BLAddInvoice();
                GetClientInfo();
                DataTable dtCleintDet = new DataTable();

                dtCleintDet.Columns.Add("Address");
                dtCleintDet.Columns.Add("PAN");
                dtCleintDet.Columns.Add("BillNo");
                string add = txtAddInvce.Text;
                string pan = txtPanNo.Text;
                string billno = txtBillNo.Text;
                dtCleintDet.Rows.Add(add, pan, billno);
                Session["ClNm"] = ClNm;
                Session["Add"] = txtAddInvce.Text;
                Session["PAN"] = txtPanNo.Text;
                Session["BillNo"] = txtBillNo.Text;

                SqlDataReader dr1 = blAddCl.getClIdByName(ClNm);
                if (dr1.HasRows)
                {
                    dr1.Read();
                    ClientId = dr1.GetInt32(0);
                    dr1.Close();
                }
                Session["ClId"] = ClientId;
            }
            catch (Exception ex)
            {
                lblCatchError.Text = ex.Message.ToString();
            }
        }