public static string GetConsultantByComid(int comid, int id) { try { B2b_company_menu com = B2bCompanyMenuData.GetConsultantByComid(comid, id); var prodata = new B2bComProData(); var actdata = new WxMaterialData(); List <B2b_com_pro> Prolist = null; List <WxMaterial> WxMaterial = null; int totalcount1 = 0; if (com.Outdata == 0) { Prolist = prodata.Selectpagelist_diaoyong(comid.ToString(), 1, 50, "", out totalcount1, 0, 0, 0, id);//读出每个栏目的产品,每页12个 } if (com.Outdata == 2) { WxMaterial = actdata.WxMaterialPageList(comid, 1, 100, 10, 1000000, out totalcount1, "", 0, id); } return(JsonConvert.SerializeObject(new { type = 100, msg = com, Prolist = Prolist, WxMaterial = WxMaterial })); } catch (Exception ex) { return(JsonConvert.SerializeObject(new { type = 1, msg = ex.Message })); } }
internal B2b_company_menu GetConsultantByComid(int comid, int id) { const string sqlTxt = @"SELECT * FROM [dbo].[consultant_pro] where comid=@comid and id=@id "; var cmd = sqlHelper.PrepareTextSqlCommand(sqlTxt); cmd.CommandType = CommandType.Text; cmd.AddParam("@comid", comid); cmd.AddParam("@id", id); using (var reader = cmd.ExecuteReader()) { B2b_company_menu u = null; while (reader.Read()) { u = new B2b_company_menu { Id = reader.GetValue <int>("Id"), Com_id = reader.GetValue <int>("comid"), Imgurl = reader.GetValue <int>("Imgurl"), Linkurl = reader.GetValue <string>("Linkurl"), Linktype = reader.GetValue <int>("Linktype"), Name = reader.GetValue <string>("Name"), Fonticon = reader.GetValue <string>("Fonticon"), Outdata = reader.GetValue <int>("Outdata"), Channelid = reader.GetValue <int>("channelid"), }; } return(u); } }
public static string GetMenuByComid(int comid, int id) { try { int totalcount1 = 0; int selectpro = 0; int totalcount2 = 0; List <WxMaterial> Material = null; var actdata = new WxMaterialData(); B2b_company_menu list = B2bCompanyMenuData.GetMenuByComid(comid, id); var prodata = new B2bComProData(); List <B2b_com_pro> Prolist = null; IEnumerable result = ""; if (list != null) { Prolist = prodata.Selectpagelist_diaoyong(comid.ToString(), 1, 12, "", out totalcount1, list.Projectlist, 0, id);//读出每个栏目的产品,每页12个 selectpro = prodata.Selectpagelist_ct(comid.ToString(), id); list.Imgurl_address = FileSerivce.GetImgUrl(list.Imgurl); Material = list.Menutype == 0 ? null : actdata.ShopWxMaterialPageList(comid, 1, 12, 10, id, list.Projectlist, out totalcount2, ""); } return(JsonConvert.SerializeObject(new { type = 100, msg = list, prolist = Prolist, selectpro = selectpro, Materiallist = Material })); } catch (Exception ex) { return(JsonConvert.SerializeObject(new { type = 1, msg = ex.Message })); } }
public int ConsultantInsertOrUpdate(B2b_company_menu imageset) { using (var helper = new SqlHelper()) { var id = new InternalB2bCompanyMenu(helper).ConsultantInsertOrUpdate(imageset); return(id); } }
public int ConsultantInsertOrUpdate(B2b_company_menu model) { var cmd = sqlHelper.PrepareStoredSqlCommand(SQLInsertOrUpdate1); cmd.AddParam("@Id", model.Id); cmd.AddParam("@Comid", model.Com_id); cmd.AddParam("@Name", model.Name); cmd.AddParam("@Linkurl", model.Linkurl); cmd.AddParam("@Linktype", model.Linktype);//产品分类 cmd.AddParam("@Imgurl", model.Imgurl); cmd.AddParam("@Fonticon", model.Fonticon); cmd.AddParam("@Outdata", model.Outdata); cmd.AddParam("@Channelid", model.Channelid); var parm = cmd.AddReturnValueParameter("ReturnValue"); cmd.ExecuteNonQuery(); return((int)parm.Value); }
//图片添加修改 public static string InsertOrUpdate(B2b_company_menu saleset) { try { var saledata = new B2bCompanyMenuData(); var crmid = saledata.InsertOrUpdate(saleset); //录入成功后操作子表 显示产品 if (crmid != 0) { //先删除原先显示的数据 var delmenu_pro = saledata.deletemenu_pro(saleset.Com_id, crmid); //重新判断再逐一插入 if (saleset.Prolist != "") { var proid_arr = saleset.Prolist.Split(','); for (int i = 0; i < proid_arr.Count(); i++) { if (proid_arr[i] != "") { if (int.Parse(proid_arr[i]) != 0) { var insertmenu_pro = saledata.Insertmenu_pro(saleset.Com_id, int.Parse(proid_arr[i]), crmid); } } } } } return(JsonConvert.SerializeObject(new { type = 100, msg = crmid })); } catch (Exception ex) { return(JsonConvert.SerializeObject(new { type = 1, msg = ex.Message })); throw; } }
private void ShowImgBind() { //var comid = Context.Request["comid"].ConvertTo<int>(0); var comid = UserHelper.CurrentCompany.ID; if (id != 0) { B2b_company_menu menumodel = B2bCompanyMenuData.GetMenuByComid(comid, id); if (menumodel != null) { Name = menumodel.Name; linkurl = menumodel.Linkurl; FileUploadModel identityFileUpload = new FileUploadData().GetFileById(menumodel.Imgurl); if (identityFileUpload != null) { headPortraitImgSrc = identityFileUpload.Relativepath; } } } }
public int InsertOrUpdate(B2b_company_menu model) { var cmd = sqlHelper.PrepareStoredSqlCommand(SQLInsertOrUpdate); cmd.AddParam("@Id", model.Id); cmd.AddParam("@Comid", model.Com_id); cmd.AddParam("@Name", model.Name); cmd.AddParam("@Linkurl", model.Linkurl); cmd.AddParam("@Linktype", model.Linktype); cmd.AddParam("@Imgurl", model.Imgurl); cmd.AddParam("@Fonticon", model.Fonticon); cmd.AddParam("@Usestyle", model.Usestyle); cmd.AddParam("@Usetype", model.Usetype); cmd.AddParam("@Projectlist", model.Projectlist); cmd.AddParam("@Menutype", model.Menutype); cmd.AddParam("@menuindex", model.menuindex); cmd.AddParam("@menuviewtype", model.menuviewtype); var parm = cmd.AddReturnValueParameter("ReturnValue"); cmd.ExecuteNonQuery(); return((int)parm.Value); }
internal B2b_company_menu GetMenuByComid(int comid, int id) { const string sqlTxt = @"SELECT * FROM [dbo].[H5Menu] where comid=@comid and id=@id"; var cmd = sqlHelper.PrepareTextSqlCommand(sqlTxt); cmd.CommandType = CommandType.Text; cmd.AddParam("@comid", comid); cmd.AddParam("@id", id); using (var reader = cmd.ExecuteReader()) { B2b_company_menu u = null; while (reader.Read()) { u = new B2b_company_menu { Id = reader.GetValue <int>("Id"), Com_id = reader.GetValue <int>("comid"), Imgurl = reader.GetValue <int>("Imgurl"), Linkurl = reader.GetValue <string>("Linkurl"), Linktype = reader.GetValue <int>("Linktype"), Name = reader.GetValue <string>("Name"), Fonticon = reader.GetValue <string>("Fonticon"), Usestyle = reader.GetValue <int>("Usestyle"), Usetype = reader.GetValue <int>("Usetype"), Projectlist = reader.GetValue <int>("Projectlist"), Menutype = reader.GetValue <int>("Menutype"), menuviewtype = reader.GetValue <int>("menuviewtype"), }; } return(u); } }
public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; string oper = context.Request["oper"].ConvertTo <string>(""); if (oper != "") { if (oper == "Getqunarbycomid") { int comid = context.Request["comid"].ConvertTo <int>(0); string data = AccountInfoJsonData.Getqunarbycomid(comid); context.Response.Write(data); } if (oper == "Editqunarbycomid") { int comid = context.Request["comid"].ConvertTo <int>(0); int isqunar = context.Request["isqunar"].ConvertTo <int>(0); string qunar_username = context.Request["qunar_username"].ConvertTo <string>(""); string qunar_pass = context.Request["qunar_pass"].ConvertTo <string>(""); string data = AccountInfoJsonData.Editqunarbycomid(comid, isqunar, qunar_username, qunar_pass); context.Response.Write(data); } if (oper == "editall") { int comid = context.Request["comid"].ConvertTo <int>(0); //当前商家id int userid = context.Request["userid"].ConvertTo <int>(0); //当前用户id //商家基本信息 int com_type = context.Request["com_type"].ConvertTo <int>(0); string com_name = context.Request["com_name"]; string Scenic_name = context.Request["Scenic_name"].ConvertTo <string>(""); int Com_state = context.Request["com_state"].ConvertTo <int>(0); decimal imprest = context.Request["imprest"].ConvertTo <decimal>(0); //商家扩展信息 int com_extid = context.Request["comextid"].ConvertTo <int>(0); string com_province = context.Request["com_province"].ConvertTo <string>(""); string com_city = context.Request["com_city"].ConvertTo <string>(""); string com_add = context.Request["com_add"].ConvertTo <string>(""); int com_class = context.Request["com_class"].ConvertTo <int>(0); string com_code = context.Request["com_code"].ConvertTo <string>(""); string com_sitecode = context.Request["com_sitecode"].ConvertTo <string>(""); string com_license = context.Request["com_license"].ConvertTo <string>(""); string sale_Agreement = context.Request["sale_Agreement"].ConvertTo <string>(""); string agent_Agreement = context.Request["agent_Agreement"].ConvertTo <string>(""); string Scenic_address = context.Request["Scenic_address"].ConvertTo <string>(""); string Scenic_intro = context.Request["Scenic_intro"].ConvertTo <string>(""); string Scenic_Takebus = context.Request["Scenic_Takebus"].ConvertTo <string>(""); string Scenic_Drivingcar = context.Request["Scenic_Drivingcar"].ConvertTo <string>(""); string Contact = context.Request["Contact"].ConvertTo <string>(""); string tel = context.Request["tel"].ConvertTo <string>(""); string phone = context.Request["phone"].ConvertTo <string>(""); string qq = context.Request["qq"].ConvertTo <string>(""); string email = context.Request["email"].ConvertTo <string>(""); string Defaultprint = context.Request["Defaultprint"].ConvertTo <string>(""); string wl_PartnerId = context.Request["wl_PartnerId"].ConvertTo <string>(""); string wl_userkey = context.Request["wl_userkey"].ConvertTo <string>(""); string serviceinfo = context.Request["serviceinfo"].ConvertTo <string>(""); string coordinate = context.Request["coordinate"].ConvertTo <string>(""); int coordinatesize = context.Request["coordinatesize"].ConvertTo <int>(13); if (coordinatesize == 0) {//地图显示大小不能等于0,按标准13大小显示 coordinatesize = 13; } string domainname = context.Request["domainname"].ConvertTo <string>(""); string admindomain = context.Request["admindomain"].ConvertTo <string>(""); string merchantintro = context.Request["merchantintro"].ConvertTo <string>(""); string weixinimg = context.Request["weixinimg"].ConvertTo <string>(""); string weixinname = context.Request["weixinname"].ConvertTo <string>(""); bool hasinnerchannel = context.Request["hasinnerchannel"].ConvertTo <bool>(true); B2b_company b2b_company = new B2b_company() { ID = comid, Com_name = com_name, Com_type = com_type, Scenic_name = Scenic_name, Com_state = 1, //默认供应商 Imprest = 0 //预付款默认为0 }; B2b_company_info B2b_Company_Info = new B2b_company_info() { Id = com_extid, Com_id = comid, Com_city = com_city, Com_class = com_class, Com_add = com_add, Com_code = com_code, Com_sitecode = com_sitecode, Com_license = com_license, Sale_Agreement = sale_Agreement, Agent_Agreement = agent_Agreement, Scenic_address = Scenic_address, Scenic_intro = Scenic_intro, Scenic_Takebus = Scenic_Takebus, Scenic_Drivingcar = Scenic_Drivingcar, Contact = Contact, Tel = tel, Phone = phone, Qq = qq, Email = email, Defaultprint = Defaultprint, Serviceinfo = serviceinfo, Coordinate = coordinate, Coordinatesize = coordinatesize, Domainname = domainname, Admindomain = admindomain, Merchant_intro = merchantintro, Weixinimg = weixinimg, Weixinname = weixinname, HasInnerChannel = hasinnerchannel, Province = com_province, wl_PartnerId = wl_PartnerId, wl_userkey = wl_userkey }; string data = "";//注册信息返回结果 try { data = AccountInfoJsonData.InsertOrUpdateB2bCompany(b2b_company, B2b_Company_Info); } catch (Exception ex) { data = ""; } context.Response.Write(data); } if (oper == "getcurcompany") { int comid = context.Request["comid"].ConvertTo <int>(0); string data = "";//获取公司基本信息和扩展信息 try { data = AccountInfoJsonData.GetAllComMsg(comid); } catch { data = ""; } context.Response.Write(data); } if (oper == "editComName") { int comid = context.Request["comid"].ConvertTo <int>(0);//当前商家id //商家基本信息 string com_name = context.Request["com_name"]; string data = "";//注册信息返回结果 try { data = AccountInfoJsonData.UpdateB2bCompanyName(comid, com_name); } catch (Exception ex) { data = ""; } context.Response.Write(data); } if (oper == "editsearchset") { int comid = context.Request["comid"].ConvertTo <int>(0);//当前商家id //商家基本信息 int setsearch = context.Request["setsearch"].ConvertTo <int>(0); string data = "";//注册信息返回结果 try { data = AccountInfoJsonData.UpdateB2bCompanySearchset(comid, setsearch); } catch (Exception ex) { data = ""; } context.Response.Write(data); } if (oper == "getcurcompanyguanzhu") { int comid = context.Request["comid"].ConvertTo <int>(0); string data = "";//获取公司基本信息和扩展信息 try { data = AccountInfoJsonData.GetAllComGuanzhuMsg(comid); } catch { data = ""; } context.Response.Write(data); } if (oper == "editcomzizhi") { int comextid = context.Request["comextid"].ConvertTo <int>(0); string comcode = context.Request["com_code"].ConvertTo <string>(""); string comsitecode = context.Request["weixinname"].ConvertTo <string>(""); string comlicence = context.Request["com_license"].ConvertTo <string>("0"); string domainname = context.Request["domainname"].ConvertTo <string>(""); string scenic_intro = context.Request["scenic_intro"].ConvertTo <string>(""); string data = "";//获取修改商家资质信息 try { data = AccountInfoJsonData.ModifyComZizhi(comextid, comcode, comsitecode, comlicence, scenic_intro, domainname); } catch { data = ""; } context.Response.Write(data); } if (oper == "changestaffpwd") { var staffid = context.Request["staffid"].ConvertTo <int>(0); var comid = context.Request["comid"].ConvertTo <int>(0); var password = context.Request["password"].ConvertTo <string>(""); string job = context.Request["job"].ConvertTo <string>(""); string Selfbrief = context.Request["Selfbrief"].ConvertTo <string>(""); string Workdaystime = context.Request["Workdaystime"].ConvertTo <string>(""); string Workendtime = context.Request["Workendtime"].ConvertTo <string>(""); string Fixphone = context.Request["Fixphone"].ConvertTo <string>(""); string Email = context.Request["Email"].ConvertTo <string>(""); string Homepage = context.Request["Homepage"].ConvertTo <string>(""); string Weibopage = context.Request["Weibopage"].ConvertTo <string>(""); string QQ = context.Request["QQ"].ConvertTo <string>(""); string Weixin = context.Request["Weixin"].ConvertTo <string>(""); string workdays = context.Request["workdays"].ConvertTo <string>(""); int projectid = context.Request["projectid"].ConvertTo <int>(0); string proid = context.Request["proid"].ConvertTo <string>(""); int bindingproid = context.Request["bindingproid"].ConvertTo <int>(0); B2b_company_manageuser manageruser = B2bCompanyManagerUserData.GetUser(staffid); if (manageruser != null) { manageruser.Job = job; manageruser.Passwords = password; manageruser.Selfbrief = Selfbrief; manageruser.Workdaystime = Workdaystime; manageruser.Workendtime = Workendtime; manageruser.Fixphone = Fixphone; manageruser.Email = Email; manageruser.Homepage = Homepage; manageruser.QQ = QQ; manageruser.Weixin = Weixin; manageruser.Weibopage = Weibopage; manageruser.bindingproid = bindingproid; } try { //暂时不对菜单进行跟踪,默认添加成功,发生错误概率较低 //通过员工id获取渠道id var channelid = new MemberChannelData().GetChannelidbymanageuserid(staffid, comid); //获取是否已经此渠道是否已经添加过菜单,对原有菜单修改 var id = new B2bCompanyMenuData().getConsultantidbychannelid(channelid); //添加渠道菜单 B2b_company_menu menumodel = new B2b_company_menu() { Id = id, Com_id = comid, Imgurl = 0, Linkurl = "", Linktype = projectid, Name = "我的推荐", Fonticon = "", Outdata = 0, Prolist = proid, Channelid = channelid, }; var data1 = DirectSellJsonData.ConsultantInsertOrUpdate(menumodel); //context.Response.Write(data1); } catch { } var data = AccountInfoJsonData.Changestaffpwd(staffid, password, manageruser); context.Response.Write(data); } if (oper == "editlp") { var comid = context.Request["comid"].ConvertTo <int>(0); var lp_agentlevel = context.Request["lp_agentlevel"].ConvertTo <int>(0); var lp = context.Request["lp"].ConvertTo <int>(0); var data = AccountInfoJsonData.EditLp(comid, lp, lp_agentlevel); context.Response.Write(data); } if (oper == "editstaff") { var staffid = context.Request["staffid"].ConvertTo <int>(0); var comid = context.Request["comid"].ConvertTo <int>(0); var userid = context.Request["userid"].ConvertTo <int>(0); var account = context.Request["account"].ConvertTo <string>(""); var password = context.Request["password"].ConvertTo <string>(""); var employeename = context.Request["employeename"].ConvertTo <string>(""); var tel = context.Request["tel"].ConvertTo <string>(""); var viewtel = context.Request["viewtel"].ConvertTo <int>(1); var oldtel = context.Request["oldtel"].ConvertTo <string>(""); var groupids = context.Request["groupids"].ConvertTo <string>(""); var channelcompanyid = context.Request["channelcompanyid"].ConvertTo <int>(0); var channelsource = context.Request["channelsource"].ConvertTo <int>(0); var peoplelistview = context.Request["peoplelistview"].ConvertTo <int>(0); var employeestate = context.Request["employeestate"].ConvertTo <int>(1); string job = context.Request["job"].ConvertTo <string>(""); int headimg = context.Request["headimg"].ConvertTo <int>(0); int Workingyears = context.Request["Workingyears"].ConvertTo <int>(0); string Selfbrief = context.Request["Selfbrief"].ConvertTo <string>(""); string workdays = context.Request["workdays"].ConvertTo <string>(""); string Workdaystime = context.Request["Workdaystime"].ConvertTo <string>(""); string Workendtime = context.Request["Workendtime"].ConvertTo <string>(""); string Fixphone = context.Request["Fixphone"].ConvertTo <string>(""); string Email = context.Request["Email"].ConvertTo <string>(""); string Homepage = context.Request["Homepage"].ConvertTo <string>(""); string Weibopage = context.Request["Weibopage"].ConvertTo <string>(""); string QQ = context.Request["QQ"].ConvertTo <string>(""); string Weixin = context.Request["Weixin"].ConvertTo <string>(""); //以下数据暂时没什么用 var atype = context.Request["atype"].ConvertTo <int>(0); int worktimestar = context.Request["worktimestar"].ConvertTo <int>(9); int worktimeend = context.Request["worktimeend"].ConvertTo <int>(17); int workendtimestar = context.Request["workendtimestar"].ConvertTo <int>(9); int workendtimeend = context.Request["workendtimeend"].ConvertTo <int>(17); int bindingproid = context.Request["bindingproid"].ConvertTo <int>(0); //编辑员工信息 B2b_company_manageuser manageuser = new B2b_company_manageuser() { Id = staffid, Accounts = account, Atype = atype, Com_id = comid, Createuserid = userid, Employeename = employeename, Employeestate = employeestate, Job = job, Passwords = password, Tel = tel, Viewtel = viewtel, OldTel = oldtel, Channelcompanyid = channelcompanyid, Channelsource = channelsource, Headimg = headimg, Workingyears = Workingyears, Selfbrief = Selfbrief, Workdays = workdays, Workdaystime = Workdaystime, Workendtime = Workendtime, Fixphone = Fixphone, Email = Email, Homepage = Homepage, QQ = QQ, Weixin = Weixin, Weibopage = Weibopage, Peoplelistview = peoplelistview, worktimestar = worktimestar, worktimeend = worktimeend, workendtimestar = workendtimestar, workendtimeend = workendtimeend, bindingproid = bindingproid, }; //var data1 = AccountInfoJsonData.EditStaff(manageuser); //编辑人员小组映射表 B2b_company_manageuser user = UserHelper.CurrentUser(); int createmasterid = user.Id; string createmastername = user.Employeename; DateTime createdate = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")); string data = PermissionJsonData.EditUserAndMasterGroup(manageuser, staffid.ToString(), employeename, groupids, createmasterid, createmastername, createdate); context.Response.Write(data); } if (oper == "editcomshouquan") { int comextid = context.Request["comextid"].ConvertTo <int>(0); string sale_Agreement = context.Request["sale_Agreement"].ConvertTo <string>(""); string agent_Agreement = context.Request["agent_Agreement"].ConvertTo <string>(""); string data = "";//获取修改商家授权信息 try { data = AccountInfoJsonData.ModifyComShouquan(comextid, sale_Agreement, agent_Agreement); } catch { data = ""; } context.Response.Write(data); } if (oper == "editbangprint") { int comextid = context.Request["comextid"].ConvertTo <int>(0); string Defaultprint = context.Request["Defaultprint"].ConvertTo <string>(""); string data = "";//获取修改绑定打印机信息 try { data = AccountInfoJsonData.ModifyBangPrint(comextid, Defaultprint); } catch { data = ""; } context.Response.Write(data); } if (oper == "editbangpos") { int posid = context.Request["posid"].ConvertTo <int>(0); string poscompany = context.Request["poscompany"].ConvertTo <string>(""); string remark = context.Request["Remark"].ConvertTo <string>(""); int comid = context.Request["comid"].ConvertTo <int>(0); int userid = context.Request["userid"].ConvertTo <int>(0); int pos_id = context.Request["pos_id"].ConvertTo <int>(0); int projectid = context.Request["projectid"].ConvertTo <int>(0); string md5key = context.Request["md5key"].ConvertTo <string>(""); string data = "";//获取修改绑定打印机信息 try { data = AccountInfoJsonData.ModifyBangPos(posid, poscompany, comid, userid, remark, pos_id, md5key, projectid); } catch { data = ""; } context.Response.Write(data); } if (oper == "allpos") { var pageindex = context.Request["pageindex"].ConvertTo <int>(0); var pagesize = context.Request["pagesize"].ConvertTo <int>(10); var key = context.Request["key"].ConvertTo <string>(""); string data = AccountInfoJsonData.posList(pageindex, pagesize, key); context.Response.Write(data); } if (oper == "manageuserpagelist") { var comid = context.Request["comid"]; var pageindex = context.Request["pageindex"].ConvertTo <int>(0); var pagesize = context.Request["pagesize"].ConvertTo <int>(10); string data = AccountInfoJsonData.Manageuserpagelist(comid, pageindex, pagesize); context.Response.Write(data); } if (oper == "posinfo") { int pos_id = int.Parse(context.Request["pos_id"]); var pageindex = context.Request["pageindex"].ConvertTo <int>(0); var pagesize = context.Request["pagesize"].ConvertTo <int>(10); string data = AccountInfoJsonData.posinfo(pos_id); context.Response.Write(data); } if (oper == "enterNote") { string key = context.Request["key"].ConvertTo <string>(""); var content = context.Request["content"].ConvertTo <string>(""); string title = context.Request["title"].ConvertTo <string>(""); bool radio = context.Request["radio"].ConvertTo <bool>(); int note_id = context.Request["note_id"].ConvertTo <int>(0); string data = AccountInfoJsonData.Insertnote(key, content, title, radio, note_id); context.Response.Write(data); } if (oper == "notelist") { var comid = context.Request["comid"]; var pageindex = context.Request["pageindex"].ConvertTo <int>(0); var pagesize = context.Request["pagesize"].ConvertTo <int>(10); string data = AccountInfoJsonData.notList(comid, pageindex, pagesize); context.Response.Write(data); } if (oper == "noteinfo") { int note_id = int.Parse(context.Request["note_id"]); var pageindex = context.Request["pageindex"].ConvertTo <int>(0); var pagesize = context.Request["pagesize"].ConvertTo <int>(10); string data = AccountInfoJsonData.noteinfo(note_id); context.Response.Write(data); } if (oper == "delnote") { int id = context.Request["id"].ConvertTo <int>(0); string key = context.Request["key"].ConvertTo <string>(""); string data = AccountInfoJsonData.Delnote(id, key); context.Response.Write(data); } if (oper == "ViewChildCompany") { int childcomid = context.Request["childcomid"].ConvertTo <int>(0); int curuserid = context.Request["curuserid"].ConvertTo <int>(0); string data = AccountInfoJsonData.ViewChildCompany(childcomid, curuserid); context.Response.Write(data); } if (oper == "GetAllCompany") { string data = AccountInfoJsonData.GetAllCompany(); context.Response.Write(data); } if (oper == "adjustemploerstate") { int masterid = context.Request["masterid"].ConvertTo <int>(); int employerstate = context.Request["employerstate"].ConvertTo <int>(1); string data = AccountInfoJsonData.Adjustemploerstate(masterid, employerstate); context.Response.Write(data); } if (oper == "editwxauthorfocus") { int comid = context.Request["comid"].ConvertTo <int>(); string author = context.Request["author"].ConvertTo <string>(""); string url = context.Request["url"].ConvertTo <string>(""); string data = AccountInfoJsonData.Editwxauthorfocus(comid, author, url); context.Response.Write(data); } if (oper == "editcompanyistran_customer_service") { int comid = context.Request["comid"].ConvertTo <int>(); int istransfer_customer_service = context.Request["istransfer_customer_service"].ConvertTo <int>(0); string data = AccountInfoJsonData.Editwxauthorfocus(comid, istransfer_customer_service); context.Response.Write(data); } } }
public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; string oper = context.Request["oper"].ConvertTo <string>(""); if (oper != "") { if (oper == "editcdirectset") { var directsellsetid = context.Request["directsellsetid"].ConvertTo <int>(0); var comid = context.Request["comid"].ConvertTo <int>(0); var userid = context.Request["userid"].ConvertTo <int>(0); var title = context.Request["title"].ConvertTo <string>(""); var kefu = context.Request["kefu"].ConvertTo <string>(""); var buttom = context.Request["bottom"].ConvertTo <string>(""); var smsaccount = context.Request["smsaccount"].ConvertTo <string>(""); var smspass = context.Request["smspass"].ConvertTo <string>(""); var smssign = context.Request["smssign"].ConvertTo <string>(""); var logo = context.Request["logo"].ConvertTo <string>(""); var smalllogo = context.Request["smalllogo"].ConvertTo <string>(""); B2b_company_saleset saleset = new B2b_company_saleset() { Id = directsellsetid, Com_id = comid, Dealuserid = userid, Title = title, Service_Phone = kefu, Copyright = buttom, Smsaccount = smsaccount, Smspass = smspass, Smssign = smssign, Model_style = (int)ModelStyle.DefaultModel, Payto = 0, WorkingHours = "", Tophtml = "", BottomHtml = "", Logo = logo, Smalllogo = smalllogo, Compressionlogo = smalllogo }; var data = DirectSellJsonData.InsertOrUpdate(saleset); context.Response.Write(data); } //修改短信设置 if (oper == "editsmsset") { var directsellsetid = context.Request["directsellsetid"].ConvertTo <int>(0); var comid = context.Request["comid"].ConvertTo <int>(0); var smsaccount = context.Request["smsaccount"].ConvertTo <string>(""); var smspass = context.Request["smspass"].ConvertTo <string>(""); var smssign = context.Request["smssign"].ConvertTo <string>(""); var smstype = context.Request["smstype"].ConvertTo <int>(0); var subid = context.Request["subid"].ConvertTo <string>(""); if (smstype == 1) { smssign = smssign.Trim(); if (smssign.Substring(0, 1) != "【") { var data1 = "{\"type\":1,\"msg\":\"签名必须以左中文左括号 【 \"}"; context.Response.Write(data1); return; } if (smssign.Substring(smssign.Length - 1, 1) != "】") { var data2 = "{\"type\":1,\"msg\":\"签名必须以右中文左括号 】\"}"; context.Response.Write(data2); return; } } B2b_company_saleset saleset = new B2b_company_saleset() { Id = directsellsetid, Com_id = comid, Smsaccount = smsaccount, Smspass = smspass, Smssign = smssign, Smstype = smstype, Subid = subid }; var data = DirectSellJsonData.Updatesms(saleset); context.Response.Write(data); } if (oper == "getdirectsellset") { var comid = context.Request["comid"]; var data = DirectSellJsonData.GetDirectSellByComid(comid); context.Response.Write(data); } if (oper == "getfileupload") { var id = context.Request["id"]; var data = DirectSellJsonData.GetFileupload(id); context.Response.Write(data); } if (oper == "getcomlogobyproid") { var proid = context.Request["proid"].ConvertTo <int>(0); var data = DirectSellJsonData.Getcomlogobyproid(proid); context.Response.Write(data); } if (oper == "getimagelist") { var typeid = context.Request["typeid"].ConvertTo <int>(0); var comid = context.Request["comid"].ConvertTo <int>(0); var pageindex = context.Request["pageindex"].ConvertTo <int>(0); var pagesize = context.Request["pagesize"].ConvertTo <int>(10); //var usetype = context.Request["usetype"].ConvertTo<int>(0); var data = DirectSellJsonData.Getimagelist(comid, typeid, pageindex, pagesize); context.Response.Write(data); } if (oper == "getchannelimagelist") { var typeid = context.Request["typeid"].ConvertTo <int>(0); var comid = context.Request["comid"].ConvertTo <int>(0); var channelcompanyid = context.Request["channelcompanyid"].ConvertTo <int>(0); var pageindex = context.Request["pageindex"].ConvertTo <int>(0); var pagesize = context.Request["pagesize"].ConvertTo <int>(10); var data = DirectSellJsonData.Getchannelimagelist(comid, typeid, channelcompanyid, pageindex, pagesize); context.Response.Write(data); } if (oper == "pagegetimagelist") { var typeid = context.Request["typeid"].ConvertTo <int>(0); var comid = context.Request["comid"].ConvertTo <int>(0); var pageindex = context.Request["pageindex"].ConvertTo <int>(0); var pagesize = context.Request["pagesize"].ConvertTo <int>(10); var data = DirectSellJsonData.PageGetimagelist(comid, typeid); context.Response.Write(data); } if (oper == "getimagebyid") { var id = context.Request["id"].ConvertTo <int>(0); var comid = context.Request["comid"].ConvertTo <int>(0); var data = DirectSellJsonData.GetimageByComid(comid, id); context.Response.Write(data); } if (oper == "getchannelimagebyid") { var id = context.Request["id"].ConvertTo <int>(0); var comid = context.Request["comid"].ConvertTo <int>(0); var channelcompanyid = context.Request["channelcompanyid"].ConvertTo <int>(0); var data = DirectSellJsonData.GetchannelimageByComid(comid, id, channelcompanyid); context.Response.Write(data); } //修改图片 if (oper == "editimage") { var id = context.Request["id"].ConvertTo <int>(0); var comid = context.Request["comid"].ConvertTo <int>(0); var typeid = context.Request["typeid"].ConvertTo <int>(0); var Imgurl = context.Request["imgurl"].ConvertTo <int>(0); var Linkurl = context.Request["Linkurl"].ConvertTo <string>(""); var title = context.Request["title"].ConvertTo <string>(""); B2b_company_image imagemodel = new B2b_company_image() { Id = id, Com_id = comid, Typeid = typeid, Imgurl = Imgurl, Linkurl = Linkurl, Title = title, Channelcompanyid = 0, }; var data = DirectSellJsonData.InsertOrUpdate(imagemodel); context.Response.Write(data); } //修改图片 if (oper == "editchannelimage") { var id = context.Request["id"].ConvertTo <int>(0); var comid = context.Request["comid"].ConvertTo <int>(0); var typeid = context.Request["typeid"].ConvertTo <int>(0); var Imgurl = context.Request["imgurl"].ConvertTo <int>(0); var Linkurl = context.Request["Linkurl"].ConvertTo <string>(""); var title = context.Request["title"].ConvertTo <string>(""); var channelcompanyid = context.Request["channelcompanyid"].ConvertTo <int>(0); B2b_company_image imagemodel = new B2b_company_image() { Id = id, Com_id = comid, Typeid = typeid, Imgurl = Imgurl, Linkurl = Linkurl, Title = title, Channelcompanyid = channelcompanyid, }; var data = DirectSellJsonData.ChannelInsertOrUpdate(imagemodel); context.Response.Write(data); } //删除图片 if (oper == "deleteimage") { var id = context.Request["id"].ConvertTo <int>(0); var comid = context.Request["comid"].ConvertTo <int>(0); var data = DirectSellJsonData.Deleteimage(comid, id); context.Response.Write(data); } //删除图片 if (oper == "deletechannelimage") { var id = context.Request["id"].ConvertTo <int>(0); var comid = context.Request["comid"].ConvertTo <int>(0); var channelcompanyid = context.Request["channelcompanyid"].ConvertTo <int>(0); var data = DirectSellJsonData.Deletechannelimage(comid, id, channelcompanyid); context.Response.Write(data); } //删除图片 if (oper == "updwonstate") { var id = context.Request["id"].ConvertTo <int>(0); var comid = context.Request["comid"].ConvertTo <int>(0); var channelcompanyid = context.Request["channelcompanyid"].ConvertTo <int>(0); var data = DirectSellJsonData.UpDownState(comid, id, channelcompanyid); context.Response.Write(data); } if (oper == "getmenulist") { var comid = context.Request["comid"].ConvertTo <int>(0); var pageindex = context.Request["pageindex"].ConvertTo <int>(0); var pagesize = context.Request["pagesize"].ConvertTo <int>(10); var usetype = context.Request["usetype"].ConvertTo <int>(0); var menuindex = context.Request["menuindex"].ConvertTo <int>(0); var data = DirectSellJsonData.Getmenulist(comid, pageindex, pagesize, usetype, menuindex); context.Response.Write(data); } if (oper == "getconsultantlist") { var comid = context.Request["comid"].ConvertTo <int>(0); var pageindex = context.Request["pageindex"].ConvertTo <int>(0); var pagesize = context.Request["pagesize"].ConvertTo <int>(10); var channelid = context.Request["channelid"].ConvertTo <int>(0); var data = DirectSellJsonData.Getconsultantlist(comid, pageindex, pagesize); context.Response.Write(data); } if (oper == "getmenubyid") { var id = context.Request["id"].ConvertTo <int>(0); var comid = context.Request["comid"].ConvertTo <int>(0); var data = DirectSellJsonData.GetMenuByComid(comid, id); context.Response.Write(data); } if (oper == "getconsultantbyid") { var id = context.Request["id"].ConvertTo <int>(0); var comid = context.Request["comid"].ConvertTo <int>(0); var data = DirectSellJsonData.GetConsultantByComid(comid, id); context.Response.Write(data); } if (oper == "getchannelprolist") { var id = context.Request["id"].ConvertTo <int>(0);//渠道ID var comid = context.Request["comid"].ConvertTo <int>(0); var data = DirectSellJsonData.GetChannelProList(comid, id); context.Response.Write(data); } //修改栏目 if (oper == "editmenu") { var id = context.Request["id"].ConvertTo <int>(0); var comid = context.Request["comid"].ConvertTo <int>(0); var typeid = context.Request["typeid"].ConvertTo <int>(0); var Imgurl = context.Request["imgurl"].ConvertTo <int>(0); var Linkurl = context.Request["Linkurl"].ConvertTo <string>(""); var Linktype = context.Request["Linktype"].ConvertTo <int>(0); var name = context.Request["name"].ConvertTo <string>(""); var fonticon = context.Request["fonticon"].ConvertTo <string>(""); var usetype = context.Request["usetype"].ConvertTo <int>(0); var usestyle = context.Request["usestyle"].ConvertTo <int>(0); var projectlist = context.Request["projectlist"].ConvertTo <int>(0); var prolist = context.Request["prolist"].ConvertTo <string>(""); var Menutype = context.Request["Menutype"].ConvertTo <int>(0); var menuindex = context.Request["menuindex"].ConvertTo <int>(0); var menuviewtype = context.Request["menuviewtype"].ConvertTo <int>(0); B2b_company_menu menumodel = new B2b_company_menu() { Id = id, Com_id = comid, Imgurl = Imgurl, Linkurl = Linkurl, Linktype = Linktype, Name = name, Fonticon = fonticon, Usestyle = usestyle, Usetype = usetype, Projectlist = projectlist, Prolist = prolist, Menutype = Menutype, menuindex = menuindex, menuviewtype = menuviewtype }; var data = DirectSellJsonData.InsertOrUpdate(menumodel); context.Response.Write(data); } if (oper == "MenuSort") { string ids = context.Request["ids"].ConvertTo <string>(""); string data = DirectSellJsonData.MenuSort(ids); context.Response.Write(data); } //修改底部按钮 if (oper == "editbutton") { var id = context.Request["id"].ConvertTo <int>(0); var comid = context.Request["comid"].ConvertTo <int>(0); var linkurl = context.Request["linkurl"].ConvertTo <string>(""); var name = context.Request["name"].ConvertTo <string>(""); var linkurlname = context.Request["linkurlname"].ConvertTo <string>(""); var sort = context.Request["sort"].ConvertTo <int>(0); var linktype = context.Request["linktype"].ConvertTo <int>(0); B2b_company_Button buttonmodel = new B2b_company_Button() { Id = id, Comid = comid, Linkurl = linkurl, Name = name, Linkurlname = linkurlname, Sort = sort, Linktype = linktype }; var data = DirectSellJsonData.ButtonInsertOrUpdate(buttonmodel); context.Response.Write(data); } //删除底部按钮 if (oper == "deletebutton") { var id = context.Request["id"].ConvertTo <int>(0); var comid = context.Request["comid"].ConvertTo <int>(0); var data = DirectSellJsonData.DeleteButton(comid, id); context.Response.Write(data); } //获取指定底部按钮 if (oper == "getbuttonbyid") { var id = context.Request["id"].ConvertTo <int>(0); var comid = context.Request["comid"].ConvertTo <int>(0); var data = DirectSellJsonData.GetButtonByComid(comid, id); context.Response.Write(data); } //获取指定底部按钮列表 if (oper == "getbuttonlist") { var comid = context.Request["comid"].ConvertTo <int>(0); var pageindex = context.Request["pageindex"].ConvertTo <int>(0); var pagesize = context.Request["pagesize"].ConvertTo <int>(10); var linktype = context.Request["linktype"].ConvertTo <int>(10); var data = DirectSellJsonData.GetButtonlist(comid, pageindex, pagesize, linktype); context.Response.Write(data); } //修改导航 if (oper == "editconsultant") { var id = context.Request["id"].ConvertTo <int>(0); var comid = context.Request["comid"].ConvertTo <int>(0); var typeid = context.Request["typeid"].ConvertTo <int>(0); var Imgurl = context.Request["imgurl"].ConvertTo <int>(0); var Linkurl = context.Request["Linkurl"].ConvertTo <string>(""); var Linktype = context.Request["Linktype"].ConvertTo <int>(0);//产品分类 var name = context.Request["name"].ConvertTo <string>(""); var fonticon = context.Request["fonticon"].ConvertTo <string>(""); var outdata = context.Request["outdata"].ConvertTo <int>(0); var proid = context.Request["proid"].ConvertTo <string>(""); var MaterialId = context.Request["MaterialId"].ConvertTo <string>(""); var channelid = context.Request["channelid"].ConvertTo <int>(0); //如果选择微信文章则 只记录文章选择的数据 if (outdata == 2) { proid = MaterialId; } B2b_company_menu menumodel = new B2b_company_menu() { Id = id, Com_id = comid, Imgurl = Imgurl, Linkurl = Linkurl, Linktype = Linktype, Name = name, Fonticon = fonticon, Outdata = outdata, Prolist = proid, Channelid = channelid, }; var data = DirectSellJsonData.ConsultantInsertOrUpdate(menumodel); context.Response.Write(data); } if (oper == "menuSort") { string ids = context.Request["ids"].ConvertTo <string>(""); string data = DirectSellJsonData.MenuSort(ids); context.Response.Write(data); } if (oper == "SortConsultant") { string ids = context.Request["ids"].ConvertTo <string>(""); string data = DirectSellJsonData.SortConsultant(ids); context.Response.Write(data); } //删除菜单 if (oper == "deletemenu") { var id = context.Request["id"].ConvertTo <int>(0); var comid = context.Request["comid"].ConvertTo <int>(0); var data = DirectSellJsonData.Deletemenu(comid, id); context.Response.Write(data); } //删除菜单 if (oper == "deleteConsultant") { var id = context.Request["id"].ConvertTo <int>(0); var comid = context.Request["comid"].ConvertTo <int>(0); var data = DirectSellJsonData.DeleteConsultant(comid, id); context.Response.Write(data); } } }