protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["FY"] != "" || Session["FY"] != null)
     {
         strFY = Session["FY"].ToString();
     }
     else
     {
         Session.Clear();
     }
     if (!Page.IsPostBack)
     {
         ViewState["cname"] = null;
         SMSSend.Text       = "NO";
         if (ConfigurationManager.AppSettings["SMS_INV_SEND"] != null)
         {
             SMSSend.Text = ConfigurationManager.AppSettings["SMS_INV_SEND"].ToString();
         }
         GetSuperZone();
         Session["saved"] = null;
         docno.InnerHtml  = "Not Selected";
         DDLCnfInvoice.Focus();
         Panel3.Visible     = false;
         Panel1.Visible     = false;
         pnlDetails.Visible = false;
     }
 }
    protected void btnGetData_click(object sender, EventArgs e)
    {
        DataTable dt = ObjDal.C_GetPendingApprovedDocNo(Convert.ToInt32(strFY), DDLCnfInvoice.SelectedValue.ToString()).Tables[0];

        if (dt.Rows.Count > 0)
        {
            pnlDetails.Visible     = false;
            Panel1.Visible         = true;
            Panel3.Visible         = true;
            Rptrpending.DataSource = dt;
            Rptrpending.DataBind();
        }
        else
        {
            MessageBox("There is no pending Invoice for this CnF");
            pnlDetails.Visible = false;
            Panel1.Visible     = false;
            Panel3.Visible     = false;
            pnlDetails.Visible = false;
            DDLCnfInvoice.Focus();
            return;
        }
    }
 public void GetSuperZone()
 {
     DDLCnfInvoice.DataSource = BindCnFGrid("ddlCnF", 0).Tables[0];
     DDLCnfInvoice.DataBind();
     DDLCnfInvoice.Items.Insert(0, new ListItem("--Select CnF--", "0"));
 }