Ejemplo n.º 1
0
    private void Button1_Click(object sender, EventArgs e)
    {
        //try {
        var    ud             = Session["UserData"] as UserData;
        var    bl             = new DS_CompanyInfo_Br();
        var    md             = bl.GetSingleByMemberID(ud.Member.ID);
        string LegRep         = Request.Form["LegRep"];
        string Bank           = Request.Form["Bank"];
        string Account        = Request.Form["Account"];
        string StorageArea    = Request.Form["StorageArea"];
        byte   Employees      = byte.Parse(Request.Form["Employees"]);
        byte   StudyEmployees = byte.Parse(Request.Form["StudyEmployees"]);
        string BrandName      = Request.Form["BrandName"];
        int    Monthly        = Request.Form["Monthly"].Trim() != ""?int.Parse(Request.Form["Monthly"]):0;
        string unit           = Request.Form["unit"];
        byte   AnnualTurnover = byte.Parse(Request.Form["AnnualTurnover"]);
        byte   AnnualImports  = byte.Parse(Request.Form["AnnualImports"]);
        byte   AnnualExport   = byte.Parse(Request.Form["AnnualExport"]);
        string MSCer          = Request.Form["MSCer"];
        string qc             = Request.Form["qc"];
        string mainmarket     = Request.Form["mainmarket"];
        string MajCust        = Request.Form["MajCust"];
        bool   oem            = string.IsNullOrEmpty(Request.Form["oem"]) ? false : bool.Parse(Request.Form["oem"]);
        string ComImg         = Request.Form["comimg"];

        md.LegalRepresentative = LegRep;
        md.Bank           = Bank;
        md.Account        = Account;
        md.StorageArea    = StorageArea;
        md.Employees      = Employees;
        md.StudyEmployees = StudyEmployees;
        md.BrandName      = BrandName;
        md.Monthly        = Monthly;
        md.MonthlyUnit    = unit;
        md.AnnualTurnover = AnnualTurnover;
        md.AnnualImports  = AnnualImports;
        md.AnnualExport   = AnnualExport;
        md.MSCer          = MSCer;
        md.QualityControl = qc;
        md.MainMarket     = mainmarket;
        md.MajorCustomers = MajCust;
        md.OEM            = oem;
        md.ComImg         = ComImg;

        bl.Update(md);
        Common.MessageBox.ShowAndRedirect(this, "保存成功", "DetailInfo.aspx");
        //}
        //catch (Exception ex)
        //{
        //    Common.WriteLog.SetErrLog(Request.Url.ToString(), "Button1_Click", ex.Message);
        //    Common.MessageBox.ResponseScript(this, "alert('保存出错');history.back();");
        //}
    }
Ejemplo n.º 2
0
    private void Button1_Click(object sender, EventArgs e) {
        //try {
            var ud = Session["UserData"] as UserData;
            var bl = new DS_CompanyInfo_Br();
            var md = bl.GetSingleByMemberID(ud.Member.ID);
            string LegRep = Request.Form["LegRep"];
            string Bank = Request.Form["Bank"];
            string Account = Request.Form["Account"];
            string StorageArea = Request.Form["StorageArea"];
            byte Employees = byte.Parse(Request.Form["Employees"]);
            byte StudyEmployees = byte.Parse(Request.Form["StudyEmployees"]);
            string BrandName = Request.Form["BrandName"];
            int Monthly =Request.Form["Monthly"].Trim()!=""?int.Parse(Request.Form["Monthly"]):0;
            string unit = Request.Form["unit"];
            byte AnnualTurnover = byte.Parse(Request.Form["AnnualTurnover"]);
            byte AnnualImports = byte.Parse(Request.Form["AnnualImports"]);
            byte AnnualExport = byte.Parse(Request.Form["AnnualExport"]);
            string MSCer = Request.Form["MSCer"];
            string qc = Request.Form["qc"];
            string mainmarket = Request.Form["mainmarket"];
            string MajCust = Request.Form["MajCust"];
            bool oem = string.IsNullOrEmpty(Request.Form["oem"]) ? false : bool.Parse(Request.Form["oem"]);
            string ComImg = Request.Form["comimg"];
            md.LegalRepresentative = LegRep;
            md.Bank = Bank;
            md.Account = Account;
            md.StorageArea = StorageArea;
            md.Employees = Employees;
            md.StudyEmployees = StudyEmployees;
            md.BrandName = BrandName;
            md.Monthly = Monthly;
            md.MonthlyUnit = unit;
            md.AnnualTurnover = AnnualTurnover;
            md.AnnualImports = AnnualImports;
            md.AnnualExport = AnnualExport;
            md.MSCer = MSCer;
            md.QualityControl = qc;
            md.MainMarket = mainmarket;
            md.MajorCustomers = MajCust;
            md.OEM = oem;
            md.ComImg = ComImg;

            bl.Update(md);
            Common.MessageBox.ShowAndRedirect(this, "保存成功", "DetailInfo.aspx");
        //}
        //catch (Exception ex)
        //{
        //    Common.WriteLog.SetErrLog(Request.Url.ToString(), "Button1_Click", ex.Message);
        //    Common.MessageBox.ResponseScript(this, "alert('保存出错');history.back();");
        //}
    }
Ejemplo n.º 3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Button1.Click += new EventHandler(Button1_Click);
        if (IsPostBack)
        {
            return;
        }
        //设置左边菜单
        var mst = this.Master as Member_Manage_MasterPage;

        mst.SetMenuTitle("公司资料", "详细资料");

        var ud = Session["UserData"] as UserData;
        var bl = new DS_CompanyInfo_Br();
        var md = bl.GetSingleByMemberID(ud.Member.ID);

        ViewState["LegRep"]         = md.LegalRepresentative;
        ViewState["Bank"]           = md.Bank;
        ViewState["Account"]        = md.Account;
        ViewState["StorageArea"]    = md.StorageArea;
        ViewState["Employees"]      = md.Employees;
        ViewState["StudyEmployees"] = md.StudyEmployees;
        ViewState["BrandName"]      = md.BrandName;
        ViewState["Monthly"]        = md.Monthly;
        ViewState["unit"]           = md.MonthlyUnit;
        ViewState["AnnualTurnover"] = md.AnnualTurnover;
        ViewState["AnnualImports"]  = md.AnnualImports;
        ViewState["AnnualExport"]   = md.AnnualExport;
        ViewState["MSCer"]          = string.IsNullOrEmpty(md.MSCer)?"":md.MSCer.TrimEnd(',');
        ViewState["qc"]             = md.QualityControl;
        ViewState["mainmarket"]     = md.MainMarket;
        ViewState["MajorCustomers"] = md.MajorCustomers;
        ViewState["oem"]            = md.OEM;
        ViewState["ComImg"]         = md.ComImg;

        //员工人数
        var embl = new DS_Employees_Br();

        Repeater1.DataSource = Repeater2.DataSource = embl.Query("", "px");
        Repeater1.DataBind();
        Repeater2.DataBind();

        //营业额
        var tubl = new DS_Turnover_Br();

        Repeater3.DataSource = Repeater4.DataSource = Repeater5.DataSource = tubl.Query("", "px");
        Repeater3.DataBind();
        Repeater4.DataBind();
        Repeater5.DataBind();
    }
Ejemplo n.º 4
0
    private void LinkButton1_Click(object sender, EventArgs e)
    {
        //try
        //{
        if (!Common.Validate.RegUid(Request.Form["account"]))
        {
            Common.MessageBox.Show(this, "用户帐号格式不正确", Common.MessageBox.InfoType.info, "history.back");
            return;
        }
        if (!Common.Validate.RegPwd(Request.Form["password"]))
        {
            Common.MessageBox.Show(this, "密码格式不正确", Common.MessageBox.InfoType.info, "history.back");
            return;
        }
        if (Session["CheckCode"] == null || Session["CheckCode"].ToString().ToLower() != Request.Form["chkCode"].ToLower())
        {
            Common.MessageBox.Show(this, "验证码有误,请重新输入", Common.MessageBox.InfoType.info, "history.back");
            return;
        }
        var blMember  = new DS_Members_Br();
        var mb        = blMember.CreateModel();
        var blCompany = new DS_CompanyInfo_Br();
        var com       = blCompany.CreateModel();

        mb.Email         = Request.Form["email"];
        mb.UserID        = Request.Form["account"].Trim();
        mb.Password      = Request.Form["password"].Trim();
        com.CompanyName  = Request.Form["companyName"];
        mb.TrueName      = Request.Form["trueName"];
        mb.Gender        = Request.Form["sex"];
        mb.Phone         = Request.Form["phone-qh"] + "-" + Request.Form["phone-hm"] + "-" + Request.Form["phone-fj"];
        mb.Mobile        = Request.Form["mobile"];
        com.MainIndustry = Request.Form["mainIndustry"];
        com.Province     = Request.Form["area"];
        com.City         = "";
        com.County       = "";
        com.MemberType   = byte.Parse(Request.Form["memberType"]);
        com.OfferService = "";
        com.BuyService   = "";
        com.MainIndustry = "";
        com.ComImg       = "";
        blMember.Register(mb, com);
        Common.MessageBox.Show(this, "恭喜,用户注册成功", Common.MessageBox.InfoType.info, "function(){location='../Login/login.aspx'}");
        //}
        //catch(Exception ex) {
        //    Common.MessageBox.Show(this,"抱歉,提交发生意外,可尝试重新提交或联系我们客服人员解决",Common.MessageBox.InfoType.error,"history.back");
        //}
    }
Ejemplo n.º 5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string act = Request["action"];

        if (!string.IsNullOrEmpty(act))
        {
            switch (act)
            {
            case "setmap":
                var mbbl   = new DS_CompanyInfo_Br();
                var member = mbbl.GetSingleByMemberID(int.Parse(Request.Form["memberID"]));
                member.MapNid = Request.Form["mapNid"];
                mbbl.Update(member);
                break;
            }
        }
    }
Ejemplo n.º 6
0
 private void LinkButton1_Click(object sender, EventArgs e) {
     //try
     //{
         if (!Common.Validate.RegUid(Request.Form["account"])) {
             Common.MessageBox.Show(this, "用户帐号格式不正确", Common.MessageBox.InfoType.info, "history.back");
             return;
         }
         if (!Common.Validate.RegPwd(Request.Form["password"]))
         {
             Common.MessageBox.Show(this, "密码格式不正确", Common.MessageBox.InfoType.info, "history.back");
             return;
         }
         if (Session["CheckCode"] == null || Session["CheckCode"].ToString().ToLower() != Request.Form["chkCode"].ToLower())
         {
             Common.MessageBox.Show(this, "验证码有误,请重新输入", Common.MessageBox.InfoType.info, "history.back");
             return;
         }
         var blMember = new DS_Members_Br();
         var mb = blMember.CreateModel();
         var blCompany = new DS_CompanyInfo_Br();
         var com = blCompany.CreateModel();
         mb.Email = Request.Form["email"];
         mb.UserID = Request.Form["account"].Trim();
         mb.Password = Request.Form["password"].Trim();
         com.CompanyName = Request.Form["companyName"];
         mb.TrueName = Request.Form["trueName"];
         mb.Gender = Request.Form["sex"];
         mb.Phone = Request.Form["phone-qh"] + "-" + Request.Form["phone-hm"] + "-" + Request.Form["phone-fj"];
         mb.Mobile = Request.Form["mobile"];
         com.MainIndustry = Request.Form["mainIndustry"];
         com.Province = Request.Form["area"];
         com.City = "";
         com.County = "";
         com.MemberType = byte.Parse(Request.Form["memberType"]);
         com.OfferService = "";
         com.BuyService = "";
         com.MainIndustry = "";
         com.ComImg = "";
         blMember.Register(mb, com);
         Common.MessageBox.Show(this, "恭喜,用户注册成功", Common.MessageBox.InfoType.info, "function(){location='../Login/login.aspx'}");
     //}
     //catch(Exception ex) {
     //    Common.MessageBox.Show(this,"抱歉,提交发生意外,可尝试重新提交或联系我们客服人员解决",Common.MessageBox.InfoType.error,"history.back");
     //}
 }
Ejemplo n.º 7
0
 private void Button1_Click(object sender, EventArgs e)
 {
     try
     {
         var    ud             = Session["UserData"] as UserData;
         var    bl             = new DS_CompanyInfo_Br();
         var    md             = bl.GetSingleByMemberID(ud.Member.ID);
         string companyName    = Request.Form["companyName"];
         string BusType        = Request.Form["BusType"];
         string BusModel       = Request.Form["BusModel"];
         string RegCapital     = Request.Form["RegCapital"];
         string CapitalType    = Request.Form["CapitalType"];
         string YearEst        = Request.Form["YearEst"];
         string companyAddress = Request.Form["companyAddress"];
         string regArea        = Request.Form["regArea"];
         string busArea        = Request.Form["busArea"];
         string ZipCode        = Request.Form["ZipCode"];
         string oserver        = Request.Form["oserver"];
         string buypro         = Request.Form["buypro"];
         string MainIndu       = Request.Form["MainIndu"];
         string profile        = Request.Form["profile"];
         md.CompanyName       = companyName;
         md.BusinessType      = byte.Parse(BusType);
         md.BusinessModel     = BusModel;
         md.RegisteredCapital = double.Parse(RegCapital);
         md.CapitalType       = CapitalType;
         md.YearEstablished   = short.Parse(YearEst);
         md.Province          = companyAddress;
         md.RegistrationArea  = regArea;
         md.BusinessAddress   = busArea;
         md.ZipCode           = ZipCode;
         md.OfferService      = oserver;
         md.BuyService        = buypro;
         md.MainIndustry      = MainIndu;
         md.Profile           = profile;
         bl.Update(md);
         Common.MessageBox.ShowAndRedirect(this, "保存成功", "baseinfo.aspx");
     }
     catch (Exception ex) {
         Common.WriteLog.SetErrLog(Request.Url.ToString(), "Button1_Click", ex.Message);
         Common.MessageBox.ResponseScript(this, "alert('保存出错');history.back();");
     }
 }
Ejemplo n.º 8
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Button1.Click+=new EventHandler(Button1_Click);
        if (IsPostBack) return;
        //设置左边菜单
        var mst = this.Master as Member_Manage_MasterPage;
        mst.SetMenuTitle("公司资料", "详细资料");

        var ud = Session["UserData"] as UserData;
        var bl = new DS_CompanyInfo_Br();
        var md = bl.GetSingleByMemberID(ud.Member.ID);
        ViewState["LegRep"] = md.LegalRepresentative;
        ViewState["Bank"] = md.Bank;
        ViewState["Account"] = md.Account;
        ViewState["StorageArea"] = md.StorageArea;
        ViewState["Employees"] = md.Employees;
        ViewState["StudyEmployees"] = md.StudyEmployees;
        ViewState["BrandName"] = md.BrandName;
        ViewState["Monthly"] = md.Monthly;
        ViewState["unit"] = md.MonthlyUnit;
        ViewState["AnnualTurnover"] = md.AnnualTurnover;
        ViewState["AnnualImports"] = md.AnnualImports;
        ViewState["AnnualExport"] = md.AnnualExport;
        ViewState["MSCer"] =string.IsNullOrEmpty(md.MSCer)?"":md.MSCer.TrimEnd(',');
        ViewState["qc"] = md.QualityControl;
        ViewState["mainmarket"] = md.MainMarket;
        ViewState["MajorCustomers"] = md.MajorCustomers;
        ViewState["oem"] = md.OEM;
        ViewState["ComImg"] = md.ComImg;

        //员工人数
        var embl = new DS_Employees_Br();
        Repeater1.DataSource = Repeater2.DataSource = embl.Query("", "px");
        Repeater1.DataBind();
        Repeater2.DataBind();

        //营业额
        var tubl = new DS_Turnover_Br();
        Repeater3.DataSource = Repeater4.DataSource = Repeater5.DataSource = tubl.Query("", "px");
        Repeater3.DataBind();
        Repeater4.DataBind();
        Repeater5.DataBind();
    }
Ejemplo n.º 9
0
 private void Button1_Click(object sender, EventArgs e) {
     try
     {
         var ud = Session["UserData"] as UserData;
         var bl = new DS_CompanyInfo_Br();
         var md = bl.GetSingleByMemberID(ud.Member.ID);
         string companyName=Request.Form["companyName"];
         string BusType = Request.Form["BusType"];
         string BusModel = Request.Form["BusModel"];
         string RegCapital = Request.Form["RegCapital"];
         string CapitalType = Request.Form["CapitalType"];
         string YearEst = Request.Form["YearEst"];
         string companyAddress = Request.Form["companyAddress"];
         string regArea = Request.Form["regArea"];
         string busArea = Request.Form["busArea"];
         string ZipCode = Request.Form["ZipCode"];
         string oserver = Request.Form["oserver"];
         string buypro = Request.Form["buypro"];
         string MainIndu = Request.Form["MainIndu"];
         string profile = Request.Form["profile"];
         md.CompanyName = companyName;
         md.BusinessType = byte.Parse(BusType);
         md.BusinessModel = BusModel;
         md.RegisteredCapital = double.Parse(RegCapital);
         md.CapitalType = CapitalType;
         md.YearEstablished =short.Parse(YearEst);
         md.Province = companyAddress;
         md.RegistrationArea = regArea;
         md.BusinessAddress = busArea;
         md.ZipCode = ZipCode;
         md.OfferService = oserver;
         md.BuyService = buypro;
         md.MainIndustry = MainIndu;
         md.Profile = profile;
         bl.Update(md);
         Common.MessageBox.ShowAndRedirect(this, "保存成功", "baseinfo.aspx");
     }
     catch (Exception ex) {
         Common.WriteLog.SetErrLog(Request.Url.ToString(), "Button1_Click", ex.Message);
         Common.MessageBox.ResponseScript(this, "alert('保存出错');history.back();");
     }
 }