Exemplo n.º 1
0
    private void InsertData()
    {
        if (string.IsNullOrEmpty(lblBuyerID.Text))
        {
            lblBuyerID.Text = Guid.NewGuid().ToString();
        }
        string NewLoginId     = MudarAutoGenerate.GenerateULogin(txtCompanyname.Text);
        string NewPassword    = MudarAutoGenerate.GeneratePassword(txtCompanyname.Text);
        string Country        = txtCountry.Text.ToUpper();
        string companyaddress = txtAddress1.Text + "@" + txtAddress2.Text + "@" + txtAddress3.Text;

        result = BBL.BuyerDetails_INSandUPDandDEL(lblBuyerID.Text, txtCompanyname.Text, companyaddress, txtCity.Text, txtState.Text, txtZipCode.Text, Country, txtContatperson.Text, txtContactPhone.Text, txtMobile.Text, txtEmail.Text, txtWebsite.Text, txtNotifyName.Text, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, txtBankname.Text, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, "Bhanu", string.Empty, txtTIN.Text, txtVAT.Text, txtCST.Text, MudarApp.Insert, 0);
        if (result)
        {
            result = BRE.UserLogin_INS_UPD_DEL(lblBuyerID.Text, NewLoginId, NewPassword, "Bhanu", "bhanu", MudarApp.Insert);
            if (result)
            {
                result = BRE.UserInRoles_INS_UPD_DEL(WebConfigurationManager.AppSettings["BuyerRole"].ToString(), lblBuyerID.Text, "Bhanu", "bhanu", MudarApp.Insert);
            }
        }
        //MainBuyerView.ActiveViewIndex = 1;
        //btnTBuyerInfo.BackColor = System.Drawing.ColorTranslator.FromHtml("#FFFFB3");
        //btnTBuyerInfo.ForeColor = System.Drawing.ColorTranslator.FromHtml("Gray");
        //btnTContactInfo.ForeColor = System.Drawing.ColorTranslator.FromHtml("#FFFFFF");
    }
Exemplo n.º 2
0
    protected void btnCompanyInfoNext_Click(object sender, EventArgs e)
    {
        if (string.IsNullOrEmpty(lblBuyerID.Text))
        {
            lblBuyerID.Text = Guid.NewGuid().ToString();
        }
        string NewLoginId     = MudarAutoGenerate.GenerateULogin(txtCompanyname.Text);
        string NewPassword    = MudarAutoGenerate.GeneratePassword(txtCompanyname.Text);
        string Country        = txtCountry.Text.ToUpper();
        string companyaddress = txtAddress1.Text + "@" + txtAddress2.Text + "@" + txtAddress3.Text;

        result = BBL.BuyerDetails_INSandUPDandDEL(lblBuyerID.Text, txtCompanyname.Text, companyaddress, txtCity.Text, txtState.Text, txtZipCode.Text, Country, txtContatperson.Text, txtContactPhone.Text, txtMobile.Text, txtEmail.Text, txtWebsite.Text, txtNotifyName.Text, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, txtBankname.Text, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, "Bhanu", string.Empty, txtTIN.Text, txtVAT.Text, txtCST.Text, MudarApp.Insert, 0);
        if (result)
        {
            result = BRE.UserLogin_INS_UPD_DEL(lblBuyerID.Text, NewLoginId, NewPassword, "Bhanu", "bhanu", MudarApp.Insert);
            if (result)
            {
                result = BRE.UserInRoles_INS_UPD_DEL(WebConfigurationManager.AppSettings["BuyerRole"].ToString(), lblBuyerID.Text, "Bhanu", "bhanu", MudarApp.Insert);
            }
        }
        if (txtCountry.Text.ToUpper() == "INDIA")
        {
            txtSea.Enabled = false;
            txtAir.Enabled = false;

            //price terms
            rbtnFOB.Enabled            = false;
            rbtnCIFbySea.Enabled       = false;
            rbtnCIFAirEandEUSA.Enabled = false;
            rbtnForDestination.Enabled = true;
            rbtnForDestination.Checked = true;
        }
        else
        {
            //price terms
            rbtnFOB.Enabled            = true;
            rbtnFOB.Checked            = true;
            rbtnCIFbySea.Enabled       = true;
            rbtnCIFAirEandEUSA.Enabled = true;
            rbtnForDestination.Enabled = false;
        }
        MainBuyerView.ActiveViewIndex = 1;
    }