/// <summary> /// 保存数据 /// </summary> void BaoCun() { string msg = string.Empty; string Id = Utils.GetQueryStringValue("id"); EyouSoft.Model.YlStructure.MChuanZhiInfo model = new EyouSoft.Model.YlStructure.MChuanZhiInfo(); if (!string.IsNullOrEmpty(Id)) { model = new EyouSoft.BLL.YlStructure.BJiChuXinXi().GetChuanZhiInfo(Id); } model.CompanyId = SiteUserInfo.CompanyId; model.IssueTime = DateTime.Now; model.OperatorId = SiteUserInfo.UserId; model.GongSiId = Utils.GetFormValue(YLCompanySelect1.CompIDClient); model.XiLieId = Utils.GetFormValue("txtXiLie"); model.MingCheng = Utils.GetFormValue(txtchuanzhimingcheng.UniqueID); model.MingCheng1 = Utils.GetFormValue(txtyingwenmingcheng.UniqueID); model.XingJi = (EyouSoft.Model.EnumType.YlStructure.XingJi)Utils.GetInt(Utils.GetFormValue(ddlxingji.UniqueID)); model.DunWei = Utils.GetFormValue(txtdunwei.UniqueID); model.XiaShuiRiQi = Utils.GetFormValue(txtxiashuiriqi.UniqueID); model.ZhuangXiuRiQi = Utils.GetFormValue(txtzhuangxiuriqi.UniqueID); model.ZaiKeLiang = Utils.GetFormValue(txtzaikeliang.UniqueID); model.JiaBanLouCeng = Utils.GetFormValue(txtjiaban.UniqueID); model.ChuanYuan = Utils.GetFormValue(txtchuanyuan.UniqueID); model.ChangDu = Utils.GetFormValue(txtchangdu.UniqueID); model.KuangDu = Utils.GetFormValue(txtkuandu.UniqueID); model.ChuanJi = Utils.GetFormValue(txtchuanji.UniqueID); model.ZuiGaoHangSu = Utils.GetFormValue(txtzuigaohangsu.UniqueID); model.ChuanZaiDianHua = Utils.GetFormValue(txtfuwutai.UniqueID); model.ChiShui = Utils.GetFormValue(txtChiShui.UniqueID); model.KeFangShuLiang = Utils.GetFormValue(txtKeFangShuLiang.UniqueID); #region pingmiantu var items1 = upload1.Files; var items2 = upload1.YuanFiles; var items3 = new List <EyouSoft.Model.YlStructure.MFuJianInfo>(); if (items1 != null && items1.Count > 0) { foreach (var item in items1) { var item1 = new EyouSoft.Model.YlStructure.MFuJianInfo(); item1.Filepath = item.FilePath; items3.Add(item1); } } if (items2 != null && items2.Count > 0) { foreach (var item in items2) { var item1 = new EyouSoft.Model.YlStructure.MFuJianInfo(); item1.Filepath = item.FilePath; items3.Add(item1); } } model.PingMianTus = items3; #endregion #region chuanzhitupian var items4 = upload2.Files; var items5 = upload2.YuanFiles; var items6 = new List <EyouSoft.Model.YlStructure.MFuJianInfo>(); if (items4 != null && items4.Count > 0) { foreach (var item in items4) { var item1 = new EyouSoft.Model.YlStructure.MFuJianInfo(); item1.Filepath = item.FilePath; items6.Add(item1); } } if (items5 != null && items5.Count > 0) { foreach (var item in items5) { var item1 = new EyouSoft.Model.YlStructure.MFuJianInfo(); item1.Filepath = item.FilePath; items6.Add(item1); } } model.FuJians = items6; #endregion model.JianYaoJieShao = Utils.GetFormValue(txtJieShao.UniqueID); model.XiangXiJieShao = Utils.GetYlEditorText(Request.Form[txtXXJieShao.UniqueID]); Response.Clear(); if (!string.IsNullOrEmpty(msg)) { Response.Write(UtilsCommons.AjaxReturnJson("0", msg)); Response.End(); } if (string.IsNullOrEmpty(Id)) { if (new EyouSoft.BLL.YlStructure.BJiChuXinXi().InsertChuanZhi(model) == 1) { Response.Write(UtilsCommons.AjaxReturnJson("1", "添加成功")); } else { Response.Write(UtilsCommons.AjaxReturnJson("0", "添加失败")); } } else { model.ChuanZhiId = Id; if (new EyouSoft.BLL.YlStructure.BJiChuXinXi().UpdateChuanZhi(model) == 1) { Response.Write(UtilsCommons.AjaxReturnJson("1", "修改成功")); } else { Response.Write(UtilsCommons.AjaxReturnJson("0", "修改失败")); } } Response.End(); }
/// <summary> /// 保存数据 /// </summary> void BaoCun() { string msg = string.Empty; string Id = Utils.GetQueryStringValue("id"); EyouSoft.Model.YlStructure.MGongSiInfo model = new EyouSoft.Model.YlStructure.MGongSiInfo(); model.CompanyId = SiteUserInfo.CompanyId; model.IssueTime = DateTime.Now; model.OperatorId = SiteUserInfo.UserId; model.MingCheng = Utils.GetFormValue(txtMingCheng.UniqueID); model.JianYaoJieShao = Utils.GetFormValue(txtJieShao.UniqueID); model.XiangXiJieShao = Utils.GetYlEditorText(Request.Form[txtXXJieShao.UniqueID]); model.LeiXing = (EyouSoft.Model.EnumType.YlStructure.YouLunLeiXing)Utils.GetInt(Utils.GetFormValue(ddlGSType.UniqueID)); #region logo var items1 = upload1.Files; var items2 = upload1.YuanFiles; if (items1 != null && items1.Count > 0) { model.Logo = items1[0].FilePath; } else if (items2 != null && items2.Count > 0) { model.Logo = items2[0].FilePath; } #endregion #region fujians var items4 = upload2.Files; var items5 = upload2.YuanFiles; var items6 = new List <EyouSoft.Model.YlStructure.MFuJianInfo>(); if (items4 != null && items4.Count > 0) { foreach (var item in items4) { var item1 = new EyouSoft.Model.YlStructure.MFuJianInfo(); item1.Filepath = item.FilePath; items6.Add(item1); } } if (items5 != null && items5.Count > 0) { foreach (var item in items5) { var item1 = new EyouSoft.Model.YlStructure.MFuJianInfo(); item1.Filepath = item.FilePath; items6.Add(item1); } } model.FuJians = items6; #endregion model.PaiXuId = Utils.GetInt(Utils.GetFormValue(txtPaiXuId.UniqueID)); model.YouShi = Utils.GetYlEditorText(Request.Form[txtYouShi.UniqueID]); model.RongYu = Utils.GetYlEditorText(Request.Form[txtRongYu.UniqueID]); Response.Clear(); if (!string.IsNullOrEmpty(msg)) { Response.Write(UtilsCommons.AjaxReturnJson("0", msg)); Response.End(); } if (string.IsNullOrEmpty(Id)) { if (new EyouSoft.BLL.YlStructure.BJiChuXinXi().InsertGongSi(model) == 1) { Response.Write(UtilsCommons.AjaxReturnJson("1", "添加成功")); } else { Response.Write(UtilsCommons.AjaxReturnJson("0", "添加失败")); } } else { model.GongSiId = Id; if (new EyouSoft.BLL.YlStructure.BJiChuXinXi().UpdateGongSi(model) == 1) { Response.Write(UtilsCommons.AjaxReturnJson("1", "修改成功")); } else { Response.Write(UtilsCommons.AjaxReturnJson("0", "修改失败")); } } Response.End(); }
/// <summary> /// 保存数据 /// </summary> void BaoCun() { string msg = string.Empty; string Id = Utils.GetQueryStringValue("id"); EyouSoft.Model.YlStructure.MXiLieInfo model = new EyouSoft.Model.YlStructure.MXiLieInfo(); model.CompanyId = SiteUserInfo.CompanyId; model.IssueTime = DateTime.Now; model.OperatorId = SiteUserInfo.UserId; model.GongSiId = Utils.GetFormValue(YLCompanySelect1.CompIDClient); model.JianYaoJieShao = Utils.GetFormValue(txtJieShao.UniqueID); model.XiangXiJieShao = Utils.GetYlEditorText(Request.Form[txtXXJieShao.UniqueID]); model.MingCheng = Utils.GetFormValue(txtXiLie.UniqueID); #region fujians var items1 = upload1.Files; var items2 = upload1.YuanFiles; var items3 = new List <EyouSoft.Model.YlStructure.MFuJianInfo>(); if (items1 != null && items1.Count > 0) { foreach (var item in items1) { var item1 = new EyouSoft.Model.YlStructure.MFuJianInfo(); item1.Filepath = item.FilePath; items3.Add(item1); } } if (items2 != null && items2.Count > 0) { foreach (var item in items2) { var item1 = new EyouSoft.Model.YlStructure.MFuJianInfo(); item1.Filepath = item.FilePath; items3.Add(item1); } } model.FuJians = items3; #endregion model.PaiXuId = Utils.GetInt(Utils.GetFormValue(txtPaiXuId.UniqueID)); Response.Clear(); if (!string.IsNullOrEmpty(msg)) { Response.Write(UtilsCommons.AjaxReturnJson("0", msg)); Response.End(); } if (string.IsNullOrEmpty(Id)) { if (new EyouSoft.BLL.YlStructure.BJiChuXinXi().InsertXiLie(model) == 1) { Response.Write(UtilsCommons.AjaxReturnJson("1", "添加成功")); } else { Response.Write(UtilsCommons.AjaxReturnJson("0", "添加失败")); } } else { model.XiLieId = Id; if (new EyouSoft.BLL.YlStructure.BJiChuXinXi().UpdateXiLie(model) == 1) { Response.Write(UtilsCommons.AjaxReturnJson("1", "修改成功")); } else { Response.Write(UtilsCommons.AjaxReturnJson("0", "修改失败")); } } Response.End(); }
/// <summary> /// 保存数据 /// </summary> void BaoCun() { string msg = string.Empty; string Id = Utils.GetQueryStringValue("id"); EyouSoft.Model.YlStructure.MHangQiInfo model = new EyouSoft.Model.YlStructure.MHangQiInfo(); model.SeoTitle = Utils.GetFormValue(txtSeoTitle.UniqueID); model.SeoKeyword = Utils.GetFormValue(txtSeoKeyword.UniqueID); model.SeoDescription = Utils.GetFormValue(txtSeoDescription.UniqueID); model.CompanyId = SiteUserInfo.CompanyId; model.IssueTime = DateTime.Now; model.OperatorId = SiteUserInfo.UserId; model.MingCheng = Utils.GetFormValue(txtchanpinmingcheng.UniqueID); model.BianHao = Utils.GetFormValue(txtchanpinbainhao.UniqueID); model.QiShiJiaGe = Utils.GetDecimal(Utils.GetFormValue(txtqishijiage.UniqueID)); model.GysId = Utils.GetFormValue(SupplierControl1.ClientValue); model.GongSiId = Utils.GetFormValue(YLCompanySelect1.CompIDClient); model.XiLieId = Utils.GetFormValue(ddlxilie.UniqueID); model.ChuanZhiId = Utils.GetFormValue(ddlchuanzhi.UniqueID); model.HangXianId = Utils.GetInt(Utils.GetFormValue(ddlhangxian.UniqueID)); model.ChuFaGangKouId = Utils.GetInt(Utils.GetFormValue(ddlchufagangkou.UniqueID)); model.DiDaGangKouId = Utils.GetInt(Utils.GetFormValue(ddldidagangkou.UniqueID)); model.TianShu1 = Utils.GetInt(Utils.GetFormValue(txtxingchengtian.UniqueID)); model.TianShu2 = Utils.GetInt(Utils.GetFormValue(txtxingchengwan.UniqueID)); IList <MHangQiTuJingChengShiInfo> tujings = new List <MHangQiTuJingChengShiInfo>(); model.TuJingChengShi = Utils.GetFormValue(txttujingchengshi.UniqueID);; model.GongLue = Utils.GetYlEditorText(Request.Form[txtlvyougonglve.UniqueID]); model.QiShiJiaGeShuoMing = Utils.GetYlEditorText(Request.Form[txtqishijiageshuoming.UniqueID]); model.ChanPinTeSe = Utils.GetYlEditorText(Request.Form[txtchanpintese.UniqueID]); model.YouHuiXinXi = Utils.GetYlEditorText(Request.Form[txtyouhuixinxi.UniqueID]); // model.youhuig = Utils.GetFormValue(txtchanpinmingcheng.UniqueID);优惠规则 model.FeiYongShuoMing = Utils.GetYlEditorText(Request.Form[txtfeiyongshuoming.UniqueID]); model.YuDingXuZhi = Utils.GetYlEditorText(Request.Form[txtyudingxuzhi.UniqueID]); model.YouQingTiShi = Utils.GetYlEditorText(Request.Form[txtyouqingtishi.UniqueID]); model.KeDiKouJinFen = Utils.GetInt(Utils.GetFormValue(txtzuiduojifen.UniqueID)); decimal jifenduihuan = Utils.GetDecimal(Utils.GetFormValue(txtjifenbili.UniqueID)); model.JiFenDuiHuanBiLi = jifenduihuan != 0 ? jifenduihuan / 100M : jifenduihuan; decimal jifenbili = Utils.GetDecimal(Utils.GetFormValue(txtleijibili.UniqueID)); model.JiFenLeiJiBiLi = jifenbili != 0 ? jifenbili / 100M : jifenbili; model.QianZhengQianZhu = Utils.GetYlEditorText(Request.Form[qianzhengqianzhu.UniqueID]); model.HangXianXingZhi = Utils.GetFormValue(hangxianxingzhi.UniqueID); model.FaPiaoKuaiDiJinE = Utils.GetDecimal(Utils.GetFormValue(kuaidifei.UniqueID)); model.XiaoLiang1 = Utils.GetInt(Utils.GetFormValue(txtXiaoLiang.UniqueID)); model.HaoPing = Utils.GetDecimal(Utils.GetFormValue(txtHaoPing.UniqueID)); model.PaiXuId = Utils.GetInt(Utils.GetFormValue(txtpaixuid.UniqueID)); model.LeiXing = (EyouSoft.Model.EnumType.YlStructure.YouLunLeiXing)Utils.GetInt(Utils.GetQueryStringValue("t")); #region fujians var items1 = upload1.Files; var items2 = upload1.YuanFiles; var items3 = new List <EyouSoft.Model.YlStructure.MFuJianInfo>(); if (items1 != null && items1.Count > 0) { foreach (var item in items1) { var item1 = new EyouSoft.Model.YlStructure.MFuJianInfo(); item1.Filepath = item.FilePath; items3.Add(item1); } } if (items2 != null && items2.Count > 0) { foreach (var item in items2) { var item1 = new EyouSoft.Model.YlStructure.MFuJianInfo(); item1.Filepath = item.FilePath; items3.Add(item1); } } model.FuJians = items3; #endregion #region 行程安排 //string[] qujians1 = Utils.GetFormValues("qujians"); //string[] qujians2 = Utils.GetFormValues("qujiane"); string[] qujian = Utils.GetFormValues("qujian"); string[] jiaotonggongjus = Utils.GetFormValues("jiaotong"); string[] bancis = Utils.GetFormValues("banci"); string[] zaos = Utils.GetFormValues("zaocan"); string[] zhongs = Utils.GetFormValues("wucan"); string[] wans = Utils.GetFormValues("wancan"); string[] zhusus = Utils.GetFormValues("zhusu"); string[] neirongs = Utils.GetYlEditorValues("neirong"); string[] files = Utils.GetFormValues("hide_Cruiseimg_file"); IList <MHangQiXingChengInfo> xingchengs = new List <MHangQiXingChengInfo>(); if (qujian != null && qujian.Length > 0) { for (int i = 0; i < qujian.Length; i++) { MHangQiXingChengInfo xingcheng = new MHangQiXingChengInfo(); xingcheng.QuJian1 = qujian[i]; //xingcheng.QuJian2 = qujians2[i]; xingcheng.JiaoTongGongJu = jiaotonggongjus[i]; //xingcheng.BanCi = bancis[i]; xingcheng.BanCi = string.Empty; xingcheng.Zao = zaos[i]; xingcheng.Zhong = zhongs[i]; xingcheng.Wan = wans[i]; xingcheng.ZhuSu = zhusus[i]; xingcheng.NeiRong = neirongs[i]; if (files[i] != null && files[i].Split('|').Length > 0) { xingcheng.Filepath = files[i].Split('|')[1]; } xingchengs.Add(xingcheng); } } model.XingChengs = xingchengs; #endregion #region 附加产品 string[] fuwuleixings = Utils.GetFormValues("selectfwlx"); string[] fuwuxiangmus = Utils.GetFormValues("txtfwxm"); string[] danjias = Utils.GetFormValues("txtdanjia"); string[] jijiadanweis = Utils.GetFormValues("txtjijiadanwei"); string[] chanpinjieshaos = Utils.GetYlEditorValues("txtchanpinjieshao"); string[] fujiacpids = Utils.GetFormValues("fujiacpid"); IList <MHangQiFuJiaChanPinInfo> fujias = new List <MHangQiFuJiaChanPinInfo>(); if (fuwuleixings != null && fuwuleixings.Length > 0) { for (int i = 0; i < fuwuleixings.Length; i++) { MHangQiFuJiaChanPinInfo fujia = new MHangQiFuJiaChanPinInfo(); fujia.LeiXingId = Utils.GetInt(fuwuleixings[i]); fujia.XiangMu = fuwuxiangmus[i]; fujia.DanJia = Utils.GetDecimal(danjias[i]); fujia.DanWei = jijiadanweis[i]; fujia.JieShao = chanpinjieshaos[i]; fujia.FuJiaChanPinId = fujiacpids[i]; if (fujia.LeiXingId == 0) { continue; } fujias.Add(fujia); } } model.FuJiaChanPins = fujias; #endregion Response.Clear(); if (!string.IsNullOrEmpty(msg)) { Response.Write(UtilsCommons.AjaxReturnJson("0", msg)); Response.End(); } if (string.IsNullOrEmpty(Id)) { if (new EyouSoft.BLL.YlStructure.BHangQi().InsertHangQi(model) == 1) { Response.Write(UtilsCommons.AjaxReturnJson("1", "添加成功")); } else { Response.Write(UtilsCommons.AjaxReturnJson("0", "添加失败")); } } else { model.HangQiId = Id; if (new EyouSoft.BLL.YlStructure.BHangQi().UpdateHangQi(model) == 1) { Response.Write(UtilsCommons.AjaxReturnJson("1", "修改成功")); } else { Response.Write(UtilsCommons.AjaxReturnJson("0", "修改失败")); } } Response.End(); }