protected void btnSave_Click(object sender, EventArgs e) { ////Hashtable htParameters = new Hashtable(); ////htParameters.Add("Mode", 0); ////htParameters.Add("Company",txtCompanyName.Text); ////htParameters.Add("LastName",txtLastName.Text); ////htParameters.Add("FirstName",txtFirstName.Text); ////htParameters.Add("EmailAddress",txtEmail.Text); ////htParameters.Add("JobTitle",ddlDesignation.Text); ////htParameters.Add("BusinessPhone",txtTelephone.Text); //////htParameters.Add("HomePhone",DBNull.Value); //// //,MobilePhone ////htParameters.Add("FaxNumber",txtFax.Text); ////htParameters.Add("Address",txtNo.Text + " " + txtStreet.Text + " " + ddlCountry.SelectedValue + " " + txtZipCode.Text); ////htParameters.Add("ZipPostal", txtZipCode.Text); ////htParameters.Add("WebPage", txtWebsite.Text); FrameWork.Suppliers supp = new FrameWork.Suppliers(); supp.Company = txtCompanyName.Text; supp.Address = txtNo.Text + " " + txtStreet.Text + " " + ddlCountry.SelectedValue + " " + txtZipCode.Text; supp.TIN = txtTIN.Text; supp.LastName = txtLastName.Text; supp.FirstName = txtFirstName.Text; supp.EmailAddress = txtEmail.Text; supp.JobTitle = ddlDesignation.Text; supp.BusinessPhone = txtTelephone.Text; supp.FaxNumber = txtFax.Text; supp.ZipPostal = txtZipCode.Text; supp.WebPage = txtWebsite.Text; BusinessRule.busSupplier supps = new BusinessRule.busSupplier(); supps.insertSupplier(supp); busSupplier bussup = new busSupplier(); DataTable dt = new DataTable("User"); dt = bussup.allSupplier(); GridView1.DataSource = dt; GridView1.DataBind(); //MainClass.Library.Command.Execute(htParameters, "SupplierMod"); //,City //,StateProvince //,ZipPostal //,CountryRegion //,WebPage //,Notes //,Attachments //,SupplierName //,FileAs }
protected void Page_Load(object sender, EventArgs e) { if (Session["user"] == null) { Response.Redirect("Login.aspx"); } if (!Page.IsPostBack) { BindCountry(); } if (!IsPostBack) { busSupplier bussup = new busSupplier(); DataTable dt = new DataTable("User"); dt = bussup.allSupplier(); GridView1.DataSource = dt; GridView1.DataBind(); } }