Exemplo n.º 1
0
        protected void GetItemMaster()
        {
            var oSOCreation = new clsSOCreation();
            var ldata       = oSOCreation.RetrieveItemMaster(ddItemSearchItem.Text.Trim(), txtSearchItem.Text, "");

            grvItemClass.DataSource = ldata;
            grvItemClass.DataBind();
            grvItemClass.GridLines = GridLines.None;
        }
        //protected void GetSOtoGrid_()
        //{
        //    string access = Session["User_Access"].ToString();

        //    if (access == "AE")
        //    {
        //        var ldata = SO_Creation.RetrieveSO(oCon, txtSearch.Text.Trim(), Session["User_Name"].ToString(), Session["User_Access"].ToString(), ddlSOStatus.SelectedValue.ToString());
        //        grvMainSO.DataSource = ldata;
        //    }
        //    else if (access == "IT" || access == "BCC" || access == "PM")
        //    {
        //        var ldata = SO_Creation.RetrieveSO(oCon, txtSearch.Text.Trim(), Session["User_Name"].ToString(), "BCC", ddlSOStatus.SelectedValue.ToString());
        //        grvMainSO.DataSource = ldata;
        //    }

        //    grvMainSO.DataBind();
        //    grvMainSO.GridLines = GridLines.None;
        //}

        protected void GetSavedItems()
        {
            var oSOCreation = new clsSOCreation();
            var ldata       = oSOCreation.RetrieveItemsByidSOHeader(int.Parse(Session["idSOHeader"].ToString()));

            gvItems.DataSource = null;
            gvItems.DataBind();

            gvItems.DataSource = ldata;
            gvItems.DataBind();
            gvItems.GridLines = GridLines.None;
        }
Exemplo n.º 3
0
        protected void GetCreditTermToDD()
        {
            clsSOCreation        oSOCreation = new clsSOCreation();
            List <clsSOCreation> lData       = oSOCreation.RetrieveCreditTerm();

            ddCreditTerm.Items.Clear();
            ddCreditTerm.DataSource     = lData;
            ddCreditTerm.DataTextField  = "credit_term";
            ddCreditTerm.DataValueField = "credit_term";

            ddCreditTerm.DataBind();
        }
        protected void defaultSettings()
        {
            InvoicePanel.Visible   = true;
            pnlAllDetails.Visible  = false;
            tblSearch.Visible      = true;
            btnBack.Visible        = false;
            btnSave.Visible        = false;
            myModalWarning.Visible = false;
            grossamt.Visible       = false;
            netamt.Visible         = false;
            outputvat.Visible      = false;
            lblSONumber.Visible    = false;
            lblSONumber_.Visible   = false;

            Session["idSOHeader"]  = "";
            txtDueDate.Text        = "";
            txtCustPONum.Text      = "";
            txtCustomerCode.Text   = "";
            txtFreightCharges.Text = "";
            txtOtherCharges.Text   = "";
            txtSite.Text           = "";
            txtRemarks.Text        = "";
            txtCurrency.Text       = "";
            txtCustomerName.Text   = "";
            txtSpecialConc.Text    = "";

            txtDueDate_.Visible        = false;
            txtDueDate.ReadOnly        = false;
            txtCustPONum.ReadOnly      = false;
            txtFreightCharges.ReadOnly = false;
            txtOtherCharges.ReadOnly   = false;
            txtDueDate.TextMode        = TextBoxMode.Date;
            txtGrossAmt.ReadOnly       = true;
            txtNetAmt.ReadOnly         = true;
            txtOutputVat.ReadOnly      = true;
            txtSite.ReadOnly           = false;
            txtRemarks.ReadOnly        = false;
            txtSite.Visible            = false;
            ddSite.Visible             = true;
            txtCurrency.Visible        = false;
            txtStockStatus.Visible     = false;
            chckTaxExempt.Checked      = false;

            txtCustomerCode.ReadOnly = true;
            txtCustomerName.ReadOnly = true;
            chckTaxExempt.Checked    = false;

            Session["Mode"] = "";

            var     oSOCreation = new clsSOCreation();
            decimal Tax         = oSOCreation.GetTaxFromDB();

            Session["Tax"] = Convert.ToString(Tax);

            Session.Remove("Data");

            Session.Remove("idSOHeader");
            Session.Remove("idCustomer");
            Session.Remove("ItemNo");
            Session.Remove("ItemQty");
            Session.Remove("CurrentAllocQty");
            Session.Remove("CurrentTotalQty");
            Session.Remove("Description");
            Session.Remove("Mode");
            Session.Remove("Address1");
            Session.Remove("Address2");
            Session.Remove("Address3");
            Session.Remove("Address4");
            Session.Remove("CompanyName");
            Session.Remove("SOStatus");

            gvItems.DataSource = null;
            gvItems.DataBind();

            for (int x = Session.Count - 1; x >= 6; x--)
            {
                Session.RemoveAt(x);
            }
        }