public void BindCustomer()
 {
     DDLCustomer.Items.Clear();
     DDLCustomer.DataSource = DCMaster.Get_Customer_PendingDocNo("Editinvoice", Convert.ToInt32(strFY));
     DDLCustomer.DataBind();
     DDLCustomer.Items.Insert(0, new ListItem("-Select Customer-", "0"));
 }
Beispiel #2
0
 public void SetView()
 {
     if (Request.QueryString["a"] != null)
     {
         if (Request.QueryString["a"] == "a")
         {
             Pnlcust.Visible    = true;
             pnlconfirm.Visible = false;
             Cflag = "Cancel";
             DDLCustomer.DataSource = DCMaster.Get_Customer_PendingDocNo("Customer", Convert.ToInt32(strFY));
             DDLCustomer.DataBind();
             DDLCustomer.Items.Insert(0, new ListItem("-Select Customer-", "0"));
             DDLCustomer.Focus();
         }
         else
         if (Request.QueryString["a"] == "v")
         {
             //Pnlcust.Visible = false;
             Cflag = "Canceled";
             DDLCustomer.DataSource = DCMaster.Get_Customer_PendingDocNo("Canceled", Convert.ToInt32(strFY));
             DDLCustomer.DataBind();
             DDLCustomer.Items.Insert(0, new ListItem("-Select Customer-", "0"));
             // Rptrpending.DataSource = DCMaster.Get_Customer_PendingDocNo("Pending");
             // Rptrpending.DataBind();
             pnlconfirm.Visible  = false;
             Rptrpending.Visible = true;
         }
     }
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["ChetanaCompanyName"] != "" || Session["ChetanaCompanyName"] != null)
        {
            if (Session["FY"] != "" || Session["FY"] != null)
            {
                strChetanaCompanyName = Session["ChetanaCompanyName"].ToString();
                strFY = Session["FY"].ToString();
            }
            else
            {
                Session.Clear();
            }
        }
        if (!Page.IsPostBack)
        {
            DDLCustomer.Focus();
            docno.InnerHtml       = "Not Selected";
            RdlView.SelectedValue = "All";
            BindPanel();

            // Rptrpending.DataSource = DCDetails.Get_DC_Completed_IsApproved();
            // Rptrpending.DataBind();
            // Panel1.Visible = false;
            // DDLCustomer.DataSource = DCMaster.Get_Customer_PendingDocNo("Editinvoice", Convert.ToInt32(strFY));
            //  DDLCustomer.DataBind();
            //  DDLCustomer.Items.Insert(0, new ListItem("-Select Customer-", "0"));
            //  DCDetails.Get_DC_Completed_IsApproved(); DCMaster.Get_ApprovedDocNo();
        }
    }
Beispiel #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["ChetanaCompanyName"] != "" || Session["ChetanaCompanyName"] != null)
        {
            if (Session["FY"] != "" || Session["FY"] != null)
            {
                strChetanaCompanyName = Session["ChetanaCompanyName"].ToString();
                strFY = Session["FY"].ToString();
            }
            else
            {
                Session.Clear();
            }
        }
        if (!Page.IsPostBack)
        {
            DDLCustomer.Focus();
            SetView();
            Session["tempBookData"] = null;
            //btncancel.Visible = false;
            PnlCancel(false);


            tabledetails.Visible = false;
        }
    }
 public void BindCustomer()
 {
     DDLCustomer.Items.Clear();
     //DDLCustomer.DataSource = DCMaster.Get_Customer_PendingDocNo("Customer");
     DDLCustomer.DataSource = DCMaster.Get_Customer_PendingDocNo("zonalcust~" + DDLZone.SelectedValue.ToString(), Convert.ToInt32(strFY));
     DDLCustomer.DataBind();
     DDLCustomer.Items.Insert(0, new ListItem("- Select Customer-", "0"));
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["ChetanaCompanyName"] != null)
        {
            if (Session["FY"] != null)
            {
                strChetanaCompanyName = Session["ChetanaCompanyName"].ToString();
                strFY = Session["FY"].ToString();
            }
            else
            {
                Session.Clear();
            }
        }
        if (!Page.IsPostBack)
        {
            GetValidation(4, Convert.ToInt32(Session["Role"]));
            docno.InnerHtml = "Not Selected";
            //  RdlView.SelectedValue = "DeliveryDate";
            //Rptrpending.DataSource = DCMaster.Get_Pending_DocNo();
            // Rptrpending.DataBind();
            DDLCustomer.Focus();
            DDLCustomer.TabIndex = 0;


            //if (RdBValue == "Customer")
            //{

            BindCustomer();



            Pnldeldate.Visible  = false;
            pnlcity.Visible     = false;
            Pnlcust.Visible     = true;
            pnlDetails.Visible  = false;
            Rptrpending.Visible = true;
            upOrderNO.Update();
            pnlconfirm.Visible = false;
            //    DDLCustomer.Items.Insert(0, new ListItem("- Select Customer-", "0"));

            //}

            if (Request.QueryString["c"] != null)
            {
                DDLCustomer.SelectedValue = Request.QueryString["c"].ToString();
                fillData();
            }
        }
        if (add)
        {
            btnconfirm.Enabled = true;
        }
        if (view)
        {
            btnget.Enabled = true;
        }
    }
Beispiel #7
0
    protected void btngetcust_Click(object sender, EventArgs e)
    {
        Pnl2.Visible     = false;
        PnlAddbk.Visible = false;
        btn_Save.Visible = false;
        PnlPrint.Visible = false;
        btnPrint.Visible = false;

        frdate = txtFromDate.Text.Split('/')[2] + "/" + txtFromDate.Text.Split('/')[1] + "/" + txtFromDate.Text.Split('/')[0];
        todate = txttoDate.Text.Split('/')[2] + "/" + txttoDate.Text.Split('/')[1] + "/" + txttoDate.Text.Split('/')[0];

        fdt = Convert.ToDateTime(frdate);
        tdt = Convert.ToDateTime(todate);

        if (tdt >= fdt)
        {
            if (RdbtnSelect.SelectedValue == "CN")
            {
                Pnl1.Visible = false;

                RptrCN2.DataSource = CreditNote.GetCNNo_Bydt(Convert.ToInt32(strFY), fdt, tdt);
                RptrCN2.DataBind();

                RptrCN2.Visible = true;
                // RptrCN2.Visible = true;
                PnlPrint.Visible = false;
                Pnl2.Visible     = true;
                PnlAddbk.Visible = false;
            }
            if (RdbtnSelect.SelectedValue == "CustomerwiseCN")
            {
                DataSet ds = new DataSet();
                ds = CreditNote.GetCustlist_Bydt(Convert.ToInt32(strFY), fdt, tdt);
                if (ds.Tables[0].Rows.Count > 0)
                {
                    DDLCustomer.DataSource = CreditNote.GetCustlist_Bydt(Convert.ToInt32(strFY), fdt, tdt);
                    DDLCustomer.DataBind();
                    DDLCustomer.Items.Insert(0, new ListItem("-Select Customer-", "0"));
                    Pnl1.Visible = true;
                }
                else
                {
                    MessageBox("Records Not Available ");
                }
            }
        }
        else
        {
            MessageBox("From Date is greater than To Date");
        }
        //else
        //if (Convert.ToDateTime(todate) == Convert.ToDateTime(frdate))
        //{
        //    MessageBox("From Date and To Date are similar");

        //}
        DDLCustomer.Focus();
    }
 public void Bindcustomer()
 {
     DDLCustomer.Items.Clear();
     DDLCustomer.DataSource = DCMaster.Get_Customer_PendingDocNo("Customer", Convert.ToInt32(strFY));
     DDLCustomer.DataBind();
     DDLCustomer.Items.Insert(0, new ListItem("-Select Customer-", "0"));
     ddldocno.Items.Clear();
     ddldocno.Items.Insert(0, new ListItem("-Select Docno-", "0"));
     DDLCustomer.Focus();
 }
Beispiel #9
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         Pnl1.Visible           = true;
         PnlCustDetails.Visible = false;
         Pnl3.Visible           = false;
         Pnlview.Visible        = false;
         DDLCustomer.Focus();
         BindDDlCust();
     }
 }
    private void fillData()
    {
        //Rptrpending.DataSource = DCMaster.GetPendingDocNo_ForView(Convert.ToInt32(DDLCustomer.SelectedValue), "Customer", Convert.ToDateTime("1/11/2001"), Convert.ToDateTime("1/12/2001"));
        Rptrpending.DataSource = DCMaster.GetPendingDocNo_ForView(Convert.ToInt32(DDLCustomer.SelectedValue), "Customer_all",
                                                                  Convert.ToDateTime("1/11/2001"), Convert.ToDateTime("1/12/2001"),
                                                                  Convert.ToInt32(strFY));
        Rptrpending.DataBind();
        pnlconfirm.Visible  = true;
        Rptrpending.Visible = true;

        upOrderNO.Update();
        pnlDetails.Visible = false;
        DDLCustomer.Focus();
    }
 protected void DDLZone_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (DDLZone.SelectedIndex == 0)
     {
         // MessageBox("Select SuperZone");
         DDLZone.Focus();
         DDLCustomer.Items.Clear();
         //  DDLZone.SelectedValue = null;
     }
     else
     {
         BindCustomer();
         DDLCustomer.Focus();
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["ChetanaCompanyName"] != null)
     {
         if (Session["FY"] != null)
         {
             strChetanaCompanyName = Session["ChetanaCompanyName"].ToString();
             strFY = Session["FY"].ToString();
         }
         else
         {
             Session.Clear();
         }
     }
     if (!Page.IsPostBack)
     {
         GetValidation(4, Convert.ToInt32(Session["Role"]));
         docno.InnerHtml = "Not Selected";
         DDLCustomer.Focus();
         DDLCustomer.TabIndex = 0;
         Pnldeldate.Visible   = false;
         pnlcity.Visible      = false;
         Pnlcust.Visible      = true;
         pnlDetails.Visible   = false;
         Rptrpending.Visible  = true;
         upOrderNO.Update();
         pnlconfirm.Visible = false;
         if (Request.QueryString["c"] != null)
         {
             DDLCustomer.SelectedValue = Request.QueryString["c"].ToString();
             fillData();
         }
         ddlSDZone.DataSource = Masters.Get_AreaZone_Zone_SuperZone(0, "SDZone");
         ddlSDZone.DataBind();
         ddlSDZone.Focus();
         setddl(Session["zoneLevel"].ToString(), Session["zoneId"].ToString());
         lblFY.Text = strFY;
     }
     if (add)
     {
         btnconfirm.Enabled = true;
     }
     if (view)
     {
         btnget.Enabled = true;
     }
 }
Beispiel #13
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["FY"] != "" || Session["FY"] != null)
        {
            strFY = Session["FY"].ToString();
        }
        else
        {
            Session.Clear();
        }

        if (!Page.IsPostBack)
        {
            Session["tempBookData"] = null;
            btncancel.Visible       = false;
            DDLCustomer.Focus();
            SetView();
        }
    }
 protected void btnget_Click(object sender, EventArgs e)
 {
     try
     {
         lblmessage.InnerHtml = "";
         pnlDetails.Visible   = true;
         docno.InnerHtml      = txtdocno.Text.Trim();
         // upDetails.Visible = true;
         txtempc.Visible   = true;
         lblemp.Visible    = true;
         btnPrint.Visible  = true;
         txtremark.Visible = true;
         DataSet ds6 = new DataSet();
         //ds6 = DCDetails.Idv_Get_DCDetails_By_DocNo(Convert.ToInt32(txtdocno.Text), "allbydocno");
         ds6 = DCDetails.Idv_Get_DCDetails_By_DocNo(Convert.ToInt32(txtdocno.Text), "allbydocno", Convert.ToInt32(strFY));
         grdconfirm.DataSource = DCDetails.Idv_Get_DCDetails_By_DocNo(Convert.ToInt32(txtdocno.Text), "allbydocno", Convert.ToInt32(strFY)).Tables[0];
         grdconfirm.DataBind();
         // pnlDetails.Visible = true;
         grdconfirm.Visible         = true;
         lblempname1.InnerHtml      = Convert.ToString(ds6.Tables[1].Rows[0][0]) + " " + Convert.ToString(ds6.Tables[1].Rows[0][1]) + "   ";
         lblcustname.InnerHtml      = "  " + Convert.ToString(ds6.Tables[1].Rows[0][2]);
         lblspinstruction.InnerHtml = Convert.ToString(ds6.Tables[0].Rows[0]["SpInstruction"]);
         lbldcdate.InnerHtml        = Convert.ToString(ds6.Tables[0].Rows[0]["DocumentDate"]);
         lblorder.InnerHtml         = Convert.ToString(ds6.Tables[0].Rows[0]["OrderDate"]);
         string jv = "";
         if (grdconfirm.Rows.Count <= 0)
         {
             btnconfirm.Visible = false;
             jv = "document.getElementById('ctl00_ContentPlaceHolder1_uc_PendingDC1_btnconfirm').style.display='none';";
         }
         else
         {
             btnconfirm.Visible = true;
             jv = "document.getElementById('ctl00_ContentPlaceHolder1_uc_PendingDC1_btnconfirm').style.display='visible';";
         }
         ScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), "a", jv, true);
         DDLCustomer.Focus();
     }
     catch { }
 }
Beispiel #15
0
    public void SetView()
    {
        if (Request.QueryString["a"] != null)
        {
            if (Request.QueryString["a"] == "a")
            {
                Pnlcust.Visible = false;

                PnlInsertDocNum.Visible     = true;
                lblcanceleddate_lbl.Visible = false;
                lblcanceleddate.Visible     = false;
                Rptrpending.Visible         = false;
                upOrderNO.Visible           = false;
                //DDLCustomer.DataSource = DCMaster.Get_Customer_PendingDocNo("Customer", Convert.ToInt32(strFY));
                //DDLCustomer.DataBind();
                //DDLCustomer.Items.Insert(0, new ListItem("-Select Customer-", "0"));
                //DDLCustomer.Focus();
            }
            else
            if (Request.QueryString["a"] == "v")
            {
                Pnlcust.Visible         = true;
                PnlInsertDocNum.Visible = false;

                DDLCustomer.DataSource = DCMaster.Get_Customer_PendingDocNo("SpecimenCanceled", Convert.ToInt32(strFY));
                DDLCustomer.DataBind();
                DDLCustomer.Items.Insert(0, new ListItem("-Select -", "0"));
                DDLCustomer.Focus();
                lblcanceleddate_lbl.Visible = true;
                lblcanceleddate.Visible     = true;
                // Rptrpending.DataSource = DCMaster.Get_Customer_PendingDocNo("Pending");
                // Rptrpending.DataBind();

                Rptrpending.Visible = true;
                upOrderNO.Visible   = true;
            }
        }
    }
Beispiel #16
0
 public void BindDDlCust()
 {
     DDLCustomer.DataSource = CreditNote.GetCustlist("RtdBkCustlist");
     DDLCustomer.DataBind();
     DDLCustomer.Items.Insert(0, new ListItem("-Select Customer-", "0"));
 }
Beispiel #17
0
 public void BindDDlCust()
 {
     DDLCustomer.DataSource = CreditNote.GetCustlist(Convert.ToInt32(strFY), "CNCustlist");
     DDLCustomer.DataBind();
     DDLCustomer.Items.Insert(0, new ListItem("-Select Customer-", "0"));
 }