Ejemplo n.º 1
0
        private void PopulateDropdowns()
        {
            SqlConnectionInfo db = new SqlConnectionInfo();

            FillDropDownList(ddlItemList, db.GetDataSet("select * from ShippingItem where itemid=0 and isactive=1"), "", "ItemName", "ItemId", "ItemName");
            FillDropDownList(ddlBPName, db.GetDataSet("select * from BusinessPartners where isactive=1"), "", "BPName", "BPid", "BPName");
        }
Ejemplo n.º 2
0
        private void ddlBPName_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (ddlBPName.SelectedValue.ToString() == "0")
            {
                lblBPAddress1.Text        = "";
                lblBPAddress2.Text        = "";
                lblBPAddress3.Text        = "";
                lblBPAddress4.Text        = "";
                lblBPState2.Text          = lblBPState.Text = "";
                lblBPGSTINNO.Text         = lblConsigneeGSTIN.Text = "";
                lblStateCode.Text         = lblConsigneeStateCode.Text = "";
                lblBPName.Text            = "";
                lblConsigneeAddress.Text  = "";
                ddlItemList.SelectedValue = "0";
            }
            else
            {
                SqlConnectionInfo db       = new SqlConnectionInfo();
                DataSet           firstSet = db.GetDataSet("select * from BusinessPartners where BPid=" + ddlBPName.SelectedValue.ToString());
                lblBPName.Text           = firstSet.Tables[0].Rows[0]["BPName"].ToString();
                lblBPAddress1.Text       = firstSet.Tables[0].Rows[0]["Address1"].ToString();
                lblBPAddress2.Text       = firstSet.Tables[0].Rows[0]["Address2"].ToString();
                lblBPAddress3.Text       = firstSet.Tables[0].Rows[0]["Address3"].ToString();
                lblBPAddress4.Text       = firstSet.Tables[0].Rows[0]["Address4"].ToString();
                lblConsigneeAddress.Text = lblBPState2.Text = lblBPState.Text = firstSet.Tables[0].Rows[0]["State"].ToString();
                lblBPGSTINNO.Text        = lblConsigneeGSTIN.Text = firstSet.Tables[0].Rows[0]["GSTINNO"].ToString();
                lblStateCode.Text        = lblConsigneeStateCode.Text = "29";

                DataSet secSet = db.GetDataSet("select * from ShippingItem where BPid=" + ddlBPName.SelectedValue.ToString());
                FillDropDownList(ddlItemList, secSet, "", "ItemName", "ItemId", "ItemName");
            }
        }
Ejemplo n.º 3
0
        private void GenerateLabelValues()
        {
            SqlConnectionInfo db       = new SqlConnectionInfo();
            DataSet           firstSet = db.GetDataSet("select * from CompanyInfo");

            lblCompanyName.Text = firstSet.Tables[0].Rows[0]["CompanyName"].ToString();
            lblGSTINNO.Text     = firstSet.Tables[0].Rows[0]["GSTINNO"].ToString();
            lblCIN.Text         = firstSet.Tables[0].Rows[0]["CIN"].ToString();
            lblAddress.Text     = firstSet.Tables[0].Rows[0]["Address1"].ToString() + ", " + firstSet.Tables[0].Rows[0]["Address2"].ToString() + ", " + firstSet.Tables[0].Rows[0]["Address3"].ToString()
                                  + ", " + firstSet.Tables[0].Rows[0]["Address4"].ToString() + ", " + firstSet.Tables[0].Rows[0]["Address5"].ToString();
        }
Ejemplo n.º 4
0
 private void ddlItemList_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (ddlItemList.SelectedValue.ToString() == "0")
     {
         lblUnitPrice.Text = "0";
         lblHSNCode.Text   = "";
     }
     else
     {
         SqlConnectionInfo db       = new SqlConnectionInfo();
         DataSet           firstSet = db.GetDataSet("select * from ShippingItem where ItemId=" + ddlItemList.SelectedValue.ToString());
         lblUnitPrice.Text = firstSet.Tables[0].Rows[0]["UnitPrice"].ToString();
         lblHSNCode.Text   = firstSet.Tables[0].Rows[0]["HSNCode"].ToString();
     }
     CalculateTotals();
 }
Ejemplo n.º 5
0
        private void FillDropDown()
        {
            SqlConnectionInfo db = new SqlConnectionInfo();

            FillDropDownList(ddlBPName, db.GetDataSet("select * from BusinessPartners where isactive=1"), "", "BPName", "Bpid", "BPName");
        }