示例#1
0
        public static string SaveCompany(SalesCompanyInfo Info)
        {
            try
            {
                clsParameterCollection ParameterCollection = new clsParameterCollection();
                ParameterCollection.ProcedureName = "BS_Sales_CompanyInformation";
                ParameterCollection.Add(new clsParameter("@CompanyName", Info.CompanyName));
                ParameterCollection.Add(new clsParameter("@PersonName", Info.PersonName));
                ParameterCollection.Add(new clsParameter("@MobileNo", Info.MobileNo));
                ParameterCollection.Add(new clsParameter("@EmailID", Info.EmailID));
                ParameterCollection.Add(new clsParameter("@Address", Info.Address));

                return DataAccess.ExecuteScalarSp(ParameterCollection).ToString();
            }
            catch (Exception Ex)
            {
                if (!Ex.Message.Contains("User Define:"))
                    BL_Exception.WriteLog(Ex);

                throw Ex;
            }
        }
示例#2
0
        protected void btnsave_Click(object sender, EventArgs e)
        {
            try
            {
                SalesCompanyInfo Info = new SalesCompanyInfo();
                Info.CompanyName = txtCompName.Text;
                Info.PersonName = txtPerson.Text;
                Info.MobileNo = txtMobile.Text;
                Info.EmailID = txtEmail.Text;
                Info.Address = txtAddress.Text;

                Session["CompanyID"] = BL_Sales.SaveCompany(Info);

                UCSalesObj.ClearFields();
                UCSalesObj.BindGrid();
                SalesPop.Show();
            }
            catch (Exception Ex)
            {
            }
        }