//续费 private void AddMoneyOpear() { string startDate = Request.QueryString["StartDate"]; string endDate = Request.QueryString["EndDate"]; string applyId = Utils.InputText(Request.QueryString["ApplyId"]); if (!(StringValidate.IsDateTime(startDate) && StringValidate.IsDateTime(endDate))) { Utils.ResponseMeg(false, "到期时间格式错误"); return; } if (Convert.ToDateTime(startDate) > Convert.ToDateTime(endDate)) { Utils.ResponseMeg(false, "续费时间不对"); return; } int result = EyouSoft.BLL.SystemStructure.SysApplyService.CreateInstance().EshopRenewed(applyId, Convert.ToDateTime(startDate), Convert.ToDateTime(endDate), this.MasterUserInfo.ID, DateTime.Now); if (result == 1) { Utils.ResponseMeg(true, "操作成功"); } else if (result == 2) { Utils.ResponseMeg(false, "续费时间不对"); } else { Utils.ResponseMeg(false, "操作失败"); } }
private void BindData() { int intRecordCount = 0; string fromDate = Request.QueryString["FromDate"]; CurrentPage = Utils.GetInt(Request.QueryString["Page"], 1); if (StringValidate.IsDateTime(fromDate)) { IList <EyouSoft.Model.ToolStructure.CompanyDayMemo> list = EyouSoft.BLL.ToolStructure.CompanyDayMemo.CreateInstance().GetList(this.SiteUserInfo.CompanyID, Convert.ToDateTime(fromDate)); if (list != null && list.Count > 0) { crptMemList.DataSource = list; crptMemList.DataBind(); this.ExportPageInfo1.intPageSize = PageSize; this.ExportPageInfo1.CurrencyPage = CurrentPage; this.ExportPageInfo1.intRecordCount = intRecordCount; this.ExportPageInfo1.PageLinkURL = Request.ServerVariables["SCRIPT_NAME"].ToString() + "?"; list = null; } else { ExportPageInfo1.Visible = false; crptMemList.EmptyText = "<div style=\"text-align:center; margin-top:75px; margin-bottom:75px;\">暂无备忘录信息</div>"; } } else { //页面跳转到备忘录首页 } }
private void BindData() { string fromDate = Request.QueryString["FromDate"]; if (StringValidate.IsDateTime(fromDate)) { IList <EyouSoft.Model.ToolStructure.CompanyDayMemo> list = EyouSoft.BLL.ToolStructure.CompanyDayMemo.CreateInstance().GetList(this.SiteUserInfo.CompanyID, Convert.ToDateTime(fromDate)); if (list != null && list.Count > 0) { crptMemList.DataSource = list; crptMemList.DataBind(); list = null; } else { crptMemList.EmptyText = "<div style=\"text-align:center; margin-top:75px; margin-bottom:75px;\">暂无备忘录信息</div>"; } hdfDateTime.Value = fromDate; } else { MessageBox.ResponseScript(this.Page, "MemorandumList.tabChange(\"/Memorandum/MemorandumCalendar.aspx\")"); return; } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { lblTitle.Text = string.IsNullOrEmpty(SetTitle) == true ? "时间段" : SetTitle; dpkStart.Value = StringValidate.IsDateTime(SetStartDate) == false ? "" : SetStartDate; dpkEnd.Value = StringValidate.IsDateTime(SetEndDate) == false ? "" : SetEndDate; } }
public static DateTime GetDateTime(string key, DateTime defaultValue) { DateTime result = defaultValue; if (StringValidate.IsDateTime(key)) { DateTime.TryParse(key, out result); } return(result); }
/// <summary> /// 绑定列表 /// </summary> /// <param name="IsOneLoad">判断是否为初次加载</param> private void InitList(bool IsOneLoad) { int recordCount = 0; string CompanyId = ""; string CompanyName = null; DateTime?StartDate = null; DateTime?EndDate = null; pageIndex = Utils.GetInt(Request.QueryString["Page"]); if (pageIndex <= 0) { pageIndex = 1; } CompanyId = Utils.InputText(Request.QueryString["CompanyId"]); string date1 = Request.QueryString["BeginTime"]; string date2 = Request.QueryString["EndTime"]; CompanyName = Utils.InputText(Server.HtmlDecode(Request.QueryString["CompanyName"])); if (StringValidate.IsDateTime(date1)) { StartDate = Convert.ToDateTime(date1); } if (StringValidate.IsDateTime(date2)) { EndDate = Convert.ToDateTime(date2); } StartAndEndDate1.SetStartDate = date1; StartAndEndDate1.SetEndDate = date2; txtcompanyName.Value = CompanyName; hidCompanyId.Value = CompanyId; IList <EyouSoft.Model.TourStructure.TourVisitInfo> list = EyouSoft.BLL.TourStructure.Tour.CreateInstance().GetVisitedHistorysByCompany(pageSize, pageIndex, ref recordCount, CompanyId, CompanyName, StartDate, EndDate); if (list.Count > 0 && list != null) { this.ExportPageInfo1.intPageSize = pageSize; this.ExportPageInfo1.CurrencyPage = pageIndex; this.ExportPageInfo1.intRecordCount = recordCount; this.ExportPageInfo1.LinkType = 3; this.ExportPageInfo1.UrlParams = Request.QueryString; this.ExportPageInfo1.PageLinkURL = "VisitLocaList.aspx?"; crptinfoList.DataSource = list; crptinfoList.DataBind(); list = null; } else { crptinfoList.EmptyText = "<tr><td colspan=\"4\" align=\"center\"><div style=\"text-align:center; margin-top:75px; margin-bottom:75px;\">暂无数据!</span></div></td></tr>"; ExportPageInfo1.Visible = false; } }
//绑定控件 private void BindShopList() { int recordCount = 0; DateTime?startDate = null; DateTime?EndDate = null; int? provinceId = Utils.GetInt(Request.QueryString["ProvinceId"], 0); provinceId = provinceId == 0 ? null : provinceId; int?cityId = Utils.GetInt(Request.QueryString["CityId"], 0); cityId = cityId == 0 ? null : cityId; string companyName = Utils.InputText(Request.QueryString["CompanyName"]); string date = Request.QueryString["StartDate"]; if (StringValidate.IsDateTime(date)) { startDate = Convert.ToDateTime(date); } date = Request.QueryString["EndDate"]; if (StringValidate.IsDateTime(date)) { EndDate = Convert.ToDateTime(date); } IList <EyouSoft.Model.SystemStructure.SysApplyServiceInfo> list = EyouSoft.BLL.SystemStructure.SysApplyService.CreateInstance().GetComingExpireApplys(intPageSize, intCurrentPage, ref recordCount, EyouSoft.Model.CompanyStructure.SysService.HighShop, provinceId, cityId, companyName, startDate, EndDate); if (list.Count > 0 && list != null) { this.ExporPageInfoSelect1.intPageSize = intPageSize; this.ExporPageInfoSelect1.intRecordCount = recordCount; this.ExporPageInfoSelect1.CurrencyPage = intCurrentPage; this.ExporPageInfoSelect1.HrefType = Adpost.Common.ExporPage.HrefTypeEnum.JsHref; this.ExporPageInfoSelect1.AttributesEventAdd("onclick", "EshopDueDate.LoadData(this);", 1); this.ExporPageInfoSelect1.AttributesEventAdd("onchange", "EshopDueDate.LoadData(this);", 0); crptEshopList.DataSource = list; crptEshopList.DataBind(); list = null; } else { crptEshopList.EmptyText = "<tr><td colspan=\"11\"><div style=\"text-align:center; margin-top:75px; margin-bottom:75px;\">暂无数据!</span></div></td></tr>"; ExporPageInfoSelect1.Visible = false; } }
protected void SendSMSMethod(int typeID) { #region 获取表单数据 //单条短信价格 //SMSDecimal = EyouSoft.Common.ConfigModel.ConfigClass.GetConfigDecimal("SMS_COSTOFSINGLE"); EyouSoft.IBLL.SMSStructure.ISendMessage sBll = EyouSoft.BLL.SMSStructure.SendMessage.CreateInstance(); string returnVal = ""; //bool flag = false; List <EyouSoft.Model.SMSStructure.AcceptMobileInfo> list = new List <EyouSoft.Model.SMSStructure.AcceptMobileInfo>(); string strErr = ""; decimal teleNum = 0;//号码数量 string erroNumber = ""; string sendCustomer = ""; if (!string.IsNullOrEmpty(Utils.GetFormValue(this.txt_SendPeople.UniqueID).Trim()) && ShowSender.Checked) { sendCustomer = Utils.GetFormValue(this.txt_SendPeople.UniqueID).Trim(); } string tmpPhoneNo = Utils.GetFormValue(this.txt_TelePhoneGroup.UniqueID).Trim(); string tmpSendInfo = ""; if (!string.IsNullOrEmpty(Utils.GetFormValue(this.txt_SendContent.UniqueID).Trim())) { tmpSendInfo = Utils.GetFormValue(this.txt_SendContent.UniqueID).Trim(); } DateTime sendTime = DateTime.Now; if (!string.IsNullOrEmpty(Utils.GetFormValue("txt_SendSMS_OrderTime")) && StringValidate.IsDateTime(Utils.GetFormValue("txt_SendSMS_OrderTime"))) { sendTime = DateTime.Parse(Utils.GetFormValue("txt_SendSMS_OrderTime")); } //发送类型 EyouSoft.Model.SMSStructure.SendType sendType = (EyouSoft.Model.SMSStructure.SendType)Utils.GetInt(Utils.GetFormValue(this.ddl_SendType.UniqueID)); //发送通道 EyouSoft.Model.SMSStructure.SMSChannel sendChannel = new EyouSoft.Model.SMSStructure.SMSChannelList()[Utils.GetInt(Utils.GetFormValue(this.ddlSendChannel.UniqueID))]; //加密手机号码 string strEncryMobile = Utils.GetFormValue("EncryMobile"); //有关发送所有的数据 //isSend: false, dataSource:2, companyName:"",customerType:0, provinceId:0, cityId:0 bool sendAll_isSend = Convert.ToBoolean(Utils.GetFormValue("isSendAll")); EyouSoft.Model.SMSStructure.CustomerInfo.CustomerSource sendAll_dataSource = EyouSoft.Model.SMSStructure.CustomerInfo.CustomerSource.平台组团社客户; string sendAll_companyName = ""; int sendAll_customerType = 0; int sendAll_provinceId = 0; int sendAll_cityId = 0; if (sendAll_isSend) { sendAll_dataSource = (EyouSoft.Model.SMSStructure.CustomerInfo.CustomerSource)Convert.ToInt32(Utils.GetFormValue("sendAll.dataSource")); sendAll_customerType = Convert.ToInt32(Utils.GetFormValue("sendAll.customerType")); sendAll_companyName = Utils.GetFormValue("sendAll.companyName"); sendAll_provinceId = Convert.ToInt32(Utils.GetFormValue("sendAll.provinceId")); sendAll_cityId = Convert.ToInt32(Utils.GetFormValue("sendAll.cityId")); } #endregion #region 数据验证 if (string.IsNullOrEmpty(tmpSendInfo)) { strErr += "请输入或导入发送内容!" + "\n"; } //验证手机号码 if (!string.IsNullOrEmpty(tmpPhoneNo)) { tmpPhoneNo = tmpPhoneNo.Replace(',', ','); if (tmpPhoneNo.EndsWith(",")) { tmpPhoneNo = tmpPhoneNo.Substring(0, tmpPhoneNo.Length - 1); } string[] numberGroup = tmpPhoneNo.Split(','); teleNum = numberGroup.Length; for (int i = 0; i < teleNum; i++) { if (StringValidate.IsMobileOrPHS(numberGroup[i]) == false) { erroNumber += numberGroup[i] + "\n"; } else { list.Add(new EyouSoft.Model.SMSStructure.AcceptMobileInfo() { Mobile = numberGroup[i], IsEncrypt = false }); } } } //添加加密手机号码 if (!string.IsNullOrEmpty(strEncryMobile)) { string[] numberGroup = strEncryMobile.Split(','); teleNum = numberGroup.Length; for (int i = 0; i < teleNum; i++) { if (StringValidate.IsMobileOrPHS(numberGroup[i]) == false) { erroNumber += numberGroup[i] + "\n"; } else { list.Add(new EyouSoft.Model.SMSStructure.AcceptMobileInfo() { Mobile = numberGroup[i], IsEncrypt = true }); } } } //添加发送所有的号码 if (sendAll_isSend) { IList <EyouSoft.Model.SMSStructure.AcceptMobileInfo> sendAll_list = EyouSoft.BLL.SMSStructure.Customer.CreateInstance().GetMobiles(CompanyID, "", sendAll_customerType, sendAll_dataSource, sendAll_provinceId, sendAll_cityId); if (sendAll_list != null && sendAll_list.Count > 0) { list.AddRange(sendAll_list); } } if (list == null || list.Count <= 0) { strErr += "请输入或导入手机号码!" + "\n"; } if (erroNumber != "") { strErr += erroNumber + "以上号码格式不正确!" + "\n"; } #endregion if (strErr != "") { returnVal = "0@" + strErr; } else { if (typeID == 0) { #region 发送短信之前确认发送信息 EyouSoft.Model.SMSStructure.SendMessageInfo SMS_Model = new EyouSoft.Model.SMSStructure.SendMessageInfo(); SMS_Model.Mobiles = list; SMS_Model.CompanyId = CompanyID; SMS_Model.SMSContent = tmpSendInfo; SMS_Model.UserFullName = sendCustomer; SMS_Model.SendChannel = sendChannel; SMS_Model.SendType = sendType; SMS_Model.SendTime = sendTime; EyouSoft.Model.SMSStructure.SendResultInfo sModel = sBll.ValidateSend(SMS_Model); if (sModel != null) { if (sModel.IsSucceed == true) { //验证成功返回帐户余额以及此次所要发送的短信条数 returnVal = string.Format("1@您的账户当前余额为:{0},此次消费金额为:{1},将共发送短信{2}条!是否确定发送短信?" , sModel.AccountMoney.ToString("C2") , sModel.CountFee.ToString("C2") , (sModel.WaitSendMobileCount + sModel.WaitSendPHSCount).ToString()); } else if (sModel.ErrorMessage.IndexOf("余额不足") > -1) { returnVal = "2@" + sModel.ErrorMessage; } else { returnVal = "0@" + sModel.ErrorMessage; } } sModel = null; SMS_Model = null; #endregion } else { #region 发送操作 EyouSoft.Model.SMSStructure.SendMessageInfo sendMessageInfo = new EyouSoft.Model.SMSStructure.SendMessageInfo(); sendMessageInfo.CompanyId = CompanyID; sendMessageInfo.CompanyName = this.SiteUserInfo.CompanyName; sendMessageInfo.UserId = this.SiteUserInfo.ID; sendMessageInfo.UserFullName = sendCustomer; sendMessageInfo.SMSContent = tmpSendInfo; sendMessageInfo.SendTime = sendTime; sendMessageInfo.Mobiles = list; sendMessageInfo.SendChannel = sendChannel; sendMessageInfo.SendType = sendType; EyouSoft.Model.SMSStructure.SendResultInfo SendResultModel = sBll.Send(sendMessageInfo); if (SendResultModel.IsSucceed) { string isHasSendUser = ""; if (!string.IsNullOrEmpty(sendMessageInfo.UserFullName)) { isHasSendUser = "******"; } decimal costFee = sendMessageInfo.SendType == EyouSoft.Model.SMSStructure.SendType.直接发送 ? SendResultModel.SendFee : SendResultModel.CountFee; returnVal = "1@您本次共发送短信" + sendMessageInfo.SMSContentSendComplete.Length + "个字" + isHasSendUser + "!\n发送移动、联通共" + SendResultModel.MobileSendNumberCount + "个号码、\n发送小灵通共" + SendResultModel.PHSSendNumberCount + "个号码、\n实际共消费金额为:" + costFee.ToString("C2") + "、\n实际发送短信" + (SendResultModel.MobileSendCount + SendResultModel.PHSSendCount) + "条"; } else if (SendResultModel.ErrorMessage.IndexOf("余额不足") > -1) { returnVal = "2@" + SendResultModel.ErrorMessage; } else { returnVal = "0@" + SendResultModel.ErrorMessage; } SendResultModel = null; sendMessageInfo = null; #endregion } } Response.Clear(); Response.Write(returnVal); Response.End(); sBll = null; }
private void SavePlaneInfo() { string voyageType = Utils.GetFormValue(rdoType.UniqueID); string peopleCountType = Utils.GetFormValue(rdoPassengerType.UniqueID); int personCount = Utils.GetInt(Utils.GetFormValue(txtPersonCount.UniqueID), 0); string begionTime = Utils.GetFormValue(DatePicker1.UniqueID); string endTime = Utils.GetFormValue(DatePicker2.UniqueID); string companyName = Utils.GetFormValue(txtStockCompanyName.UniqueID); string linkName = Utils.GetFormValue(txtStockLinkName.UniqueID); string phone = Utils.GetFormValue(txtStockPhone.UniqueID); string address = Utils.GetFormValue(txtStockAddress.UniqueID); string remark = Utils.GetFormValue(txarRemark.UniqueID); if (personCount < 1) { Response.Write("{success:'3',message:'乘机人数填写错误'}"); Response.End(); return; } //时间判断 DateTime?begionTime1 = null; DateTime?endTime1 = null; if ((EyouSoft.Model.TicketStructure.VoyageType)Enum.Parse(typeof(EyouSoft.Model.TicketStructure.VoyageType), voyageType) != EyouSoft.Model.TicketStructure.VoyageType.单程) { if (!StringValidate.IsDateTime(begionTime) && StringValidate.IsDateTime(endTime)) { Response.Write("{success:'3',message:'往返时间格式填写错误'}"); Response.End(); return; } begionTime1 = Convert.ToDateTime(begionTime); endTime1 = Convert.ToDateTime(endTime); if (begionTime1 > endTime1) { Response.Write("{success:'3',message:'出发时间不能大于返程时间'}"); Response.End(); return; } } else { ; if (!StringValidate.IsDateTime(begionTime)) { Response.Write("{success:'3',message:'出发时间格式填写错误'}"); Response.End(); return; } begionTime1 = Convert.ToDateTime(begionTime); } if (!Utils.IsPhone(phone)) { Response.Write("{success:'3',message:'采购商电话号码填写错误'}"); Response.End(); return; } //航班信息 EyouSoft.Model.TicketStructure.TicketFlight flight = new EyouSoft.Model.TicketStructure.TicketFlight(); flight.PeopleNumber = personCount; flight.ReturnDate = endTime1; flight.TakeOffDate = begionTime1; flight.VoyageSet = (EyouSoft.Model.TicketStructure.VoyageType)Enum.Parse(typeof(EyouSoft.Model.TicketStructure.VoyageType), voyageType); flight.PeopleCountryType = (EyouSoft.Model.TicketStructure.PeopleCountryType)Enum.Parse(typeof(EyouSoft.Model.TicketStructure.PeopleCountryType), peopleCountType); //航班折扣申请 EyouSoft.Model.TicketStructure.TicketApply ticketapply = new EyouSoft.Model.TicketStructure.TicketApply(); ticketapply.CompanyAddress = address; ticketapply.CompanyName = companyName; ticketapply.CompanyTel = phone; ticketapply.ContactName = linkName; ticketapply.Remark = remark; ticketapply.TicketArticleID = Utils.GetFormValue(hidNewId.UniqueID); ticketapply.TicketFlight = flight; ticketapply.TicketArticleTitle = Utils.GetFormValue(hidTitle.UniqueID); if (EyouSoft.BLL.TicketStructure.TicketApply.CreateInstance().Add(ticketapply)) { Utils.ResponseMeg(true, "保存成功"); } else { Utils.ResponseMeg(false, "保存失败"); } }
private void BindLoginRecordList() { int recordCount = 0; DateTime?startDate = null; DateTime?EndDate = null; string CompanyName = Utils.InputText(Request.QueryString["CompanyName"]);//单位名称 string date = Request.QueryString["StartDate"]; if (StringValidate.IsDateTime(date)) { startDate = Convert.ToDateTime(date); //开始时间 } date = Request.QueryString["EndDate"]; //结束时间 if (StringValidate.IsDateTime(date)) { EndDate = Convert.ToDateTime(date); } EyouSoft.Model.CompanyStructure.QueryParamsAllCompany SearchModel = new EyouSoft.Model.CompanyStructure.QueryParamsAllCompany(); SearchModel.CompanyName = CompanyName; SearchModel.IsQueryOnlineUser = null; SearchModel.LoginStartDate = startDate; SearchModel.LoginEndDate = EndDate; IList <EyouSoft.Model.CompanyStructure.CompanyDetailInfo> LoginRecordList = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetListChecked(SearchModel, PageSize, PageIndex, ref recordCount); if (LoginRecordList != null && LoginRecordList.Count > 0) { this.ExporPageInfoSelect1.intPageSize = PageSize; this.ExporPageInfoSelect1.intRecordCount = recordCount; this.ExporPageInfoSelect1.CurrencyPage = PageIndex; this.ExporPageInfoSelect1.HrefType = Adpost.Common.ExporPage.HrefTypeEnum.JsHref; this.ExporPageInfoSelect1.AttributesEventAdd("onclick", "LoginRecordData.LoadData(this);", 1); this.ExporPageInfoSelect1.AttributesEventAdd("onchange", "LoginRecordData.LoadData(this);", 0); if (startDate != null || EndDate != null) { for (int i = 0; i < LoginRecordList.Count; i++) { //登录次数 LoginRecordList[i].StateMore.LoginCount = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance() .GetLoginCountByTime(LoginRecordList[i].ID, startDate, EndDate); } } this.crpLoginRecordList.DataSource = LoginRecordList; this.crpLoginRecordList.DataBind(); } else { StringBuilder strEmptyText = new StringBuilder(); strEmptyText.Append("<table width=\"100%\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"1\" class=\"kuang\">"); strEmptyText.Append("<tr background=\"" + ImageServerUrl + "/images/yunying/hangbg.gif\" class=\"white\" height=\"23\">"); strEmptyText.AppendFormat("<td width=\"5%\" height=\"23\" align=\"center\" valign=\"middle\" background=\"{0}/images/yunying/hangbg.gif\"> <strong>序号</strong> </td> <td width=\"7%\" align=\"center\" valign=\"middle\" background=\"{0}/images/yunying/hangbg.gif\"> <strong>单位名称</strong></td>", ImageServerUrl); strEmptyText.AppendFormat("<td width=\"18%\" align=\"center\" valign=\"middle\" background=\"{0}/images/yunying/hangbg.gif\"><strong>联系人</strong></td><td width=\"10%\" align=\"center\" background=\"{0}/images/yunying/hangbg.gif\"> <strong>手机</strong></td>", ImageServerUrl); strEmptyText.AppendFormat("<td width=\"12%\" align=\"center\" background=\"{0}/images/yunying/hangbg.gif\"><strong>电话</strong></td><td width=\"13%\" align=\"center\" background=\"{0}/images/yunying/hangbg.gif\"> <strong>QQ/MSN</strong></td>", ImageServerUrl); strEmptyText.AppendFormat("<td align=\"center\" background=\"{0}/images/yunying/hangbg.gif\"> <strong>最后登录时间</strong></td><td width=\"11%\" align=\"center\" valign=\"middle\" background=\"{0}/images/yunying/hangbg.gif\"><strong>登录次数</strong></td>", ImageServerUrl); strEmptyText.Append("<tr class=\"huanghui\" ><td align='center' colspan='10' height='100px'>暂无零售商历史登录记录</td></tr>"); strEmptyText.Append("</tr>"); strEmptyText.Append("<tr background=\"" + ImageServerUrl + "/images/yunying/hangbg.gif\" class=\"white\" height=\"23\">"); strEmptyText.AppendFormat("<td width=\"5%\" height=\"23\" align=\"center\" valign=\"middle\" background=\"{0}/images/yunying/hangbg.gif\"> <strong>序号</strong> </td> <td width=\"7%\" align=\"center\" valign=\"middle\" background=\"{0}/images/yunying/hangbg.gif\"> <strong>单位名称</strong></td>", ImageServerUrl); strEmptyText.AppendFormat("<td width=\"18%\" align=\"center\" valign=\"middle\" background=\"{0}/images/yunying/hangbg.gif\"><strong>联系人</strong></td><td width=\"10%\" align=\"center\" background=\"{0}/images/yunying/hangbg.gif\"> <strong>手机</strong></td>", ImageServerUrl); strEmptyText.AppendFormat("<td width=\"12%\" align=\"center\" background=\"{0}/images/yunying/hangbg.gif\"><strong>电话</strong></td><td width=\"13%\" align=\"center\" background=\"{0}/images/yunying/hangbg.gif\"> <strong>QQ/MSN</strong></td>", ImageServerUrl); strEmptyText.AppendFormat("<td align=\"center\" background=\"{0}/images/yunying/hangbg.gif\"> <strong>最后登录时间</strong></td><td width=\"11%\" align=\"center\" valign=\"middle\" background=\"{0}/images/yunying/hangbg.gif\"><strong>登录次数</strong></td>", ImageServerUrl); strEmptyText.Append("</tr>"); strEmptyText.Append("</table>"); this.crpLoginRecordList.EmptyText = strEmptyText.ToString(); } LoginRecordList = null; }
private void SaveMem() { string title = Utils.GetFormValue(txtTitle.UniqueID); string datetime = Utils.GetFormValue(DatePicker1.UniqueID); string urgent = Utils.GetFormValue(ddlUrgentType.UniqueID); string detailinfo = Utils.GetFormValue(txtDetialInfo.UniqueID); string memostate = Utils.GetFormValue(ddlMemState.UniqueID); if (title.Length <= 0) { Response.Write("请填写事件标题!"); Response.End(); return; } if (!StringValidate.IsDateTime(datetime)) { Response.Write("请填写正确的时间!"); Response.End(); return; } if (urgent.Length <= 0) { Response.Write("请选择事件紧急程度!"); Response.End(); return; } if (memostate.Length <= 0) { Response.Write("请选择事件状态!"); Response.End(); return; } EyouSoft.Model.ToolStructure.CompanyDayMemo dayMemo = new EyouSoft.Model.ToolStructure.CompanyDayMemo(); dayMemo.MemoText = detailinfo; dayMemo.MemoTitle = title; dayMemo.OperatorId = this.SiteUserInfo.ID; dayMemo.OperatorName = this.SiteUserInfo.UserName; dayMemo.UrgentType = (EyouSoft.Model.ToolStructure.MemoDetailType.UrgentType)Enum.Parse(typeof(EyouSoft.Model.ToolStructure.MemoDetailType.UrgentType), urgent); dayMemo.MemoTime = Convert.ToDateTime(datetime); dayMemo.CompanyId = this.SiteUserInfo.CompanyID; dayMemo.MemoState = (EyouSoft.Model.ToolStructure.MemoDetailType.MemoState)Enum.Parse(typeof(EyouSoft.Model.ToolStructure.MemoDetailType.MemoState), memostate); bool result = false; string memId = Utils.GetFormValue(hdfMemID.UniqueID); if (!string.IsNullOrEmpty(memId)) { //修改 dayMemo.ID = memId; result = EyouSoft.BLL.ToolStructure.CompanyDayMemo.CreateInstance().Update(dayMemo); } else { //新增 dayMemo.IssueTime = DateTime.Now; result = EyouSoft.BLL.ToolStructure.CompanyDayMemo.CreateInstance().Add(dayMemo); } if (result) { Response.Write("操作成功!"); Response.End(); } else { Response.Write("操作失败!"); Response.End(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (!CheckMasterGrant(YuYingPermission.酒店后台管理_首页板块数据管理)) { Utils.ResponseNoPermit(YuYingPermission.酒店后台管理_首页板块数据管理, true); return; } pageIndex = Utils.GetInt(Request.QueryString["page"], 1); int recordCount = 0; int dataType = Utils.GetInt(Request.QueryString["datatype"], -1); //数据类型 string InTime = Request.QueryString["CheckInDate"]; //入住日期 string OutTime = Request.QueryString["CheckOutDate"]; //离店日趋 string City = Utils.GetQueryStringValue("City"); //城市 int StarNum = Utils.GetInt(Request.QueryString["StarNum"], 0); //星级 int SelectType = Utils.GetInt(Request.QueryString["SelectType"], 0); //选择类型 string HotelName = Utils.GetQueryStringValue("HotelName"); // HotelShowType = Utils.GetInt(Request.QueryString["HotelShowType"], 0); if (!StringValidate.IsDateTime(InTime)) { Utils.ResponseMeg(false, "入住日期格式错误!"); return; } if (!StringValidate.IsDateTime(OutTime)) { Utils.ResponseMeg(false, "离店日期格式错误!"); return; } if (Convert.ToDateTime(InTime) > Convert.ToDateTime(OutTime)) { Utils.ResponseMeg(false, "入住日期和离店日期范围填写错误!"); return; } decimal?MinPrice = null; //价格范围 decimal?MaxPrice = null; string price = Utils.GetQueryStringValue("MinPrice"); if (!string.IsNullOrEmpty(price)) { if (StringValidate.IsDecimal(price)) { MinPrice = Convert.ToDecimal(price); } else { Utils.ResponseMeg(false, "价格下限输入错误!"); return; } } price = Utils.GetQueryStringValue("MaxPrice"); if (!string.IsNullOrEmpty(price)) { //price = price.ToString("F2"); if (StringValidate.IsDecimal(price)) { MaxPrice = Convert.ToDecimal(price); } else { Utils.ResponseMeg(false, "价格上限输入错误!"); return; } } //IList<EyouSoft.Model.HotelStructure.HotelInfo> list = EyouSoft.BLL.HotelStructure.HotelLocalInfo.CreateInstance().GetList(pageSize, pageIndex, ref recordCount, (EyouSoft.Model.HotelStructure.HotelShowType)Enum.Parse(typeof(EyouSoft.Model.HotelStructure.hotelshow), dataType)); EyouSoft.HotelBI.MultipleSeach searchModel = new EyouSoft.HotelBI.MultipleSeach(); searchModel.CheckInDate = InTime; searchModel.CheckOutDate = OutTime; searchModel.CityCode = City; searchModel.HotelChineseName = HotelName; searchModel.HotelRank = (EyouSoft.HotelBI.HotelRankEnum)StarNum; searchModel.IsPageView = true; searchModel.NumOfEachPage = 20; searchModel.PageNo = pageIndex; if (SelectType == 1) { // searchModel.Payment = "T"; //前台现付 } searchModel.PriceMaxRate = MaxPrice; searchModel.PriceMinRate = MinPrice; EyouSoft.Model.HotelStructure.RespPageInfo respPageInfo = null; EyouSoft.HotelBI.ErrorInfo errorModel = new EyouSoft.HotelBI.ErrorInfo(); IList <EyouSoft.Model.HotelStructure.HotelInfo> HotelList = EyouSoft.BLL.HotelStructure.Hotel.CreateInstance().GetHotelList(searchModel, ref respPageInfo, out errorModel); //如果接口查询异常 则提示 查询超时 if (errorModel == null || errorModel.ErrorType == EyouSoft.HotelBI.ErrorType.未知错误 || errorModel.ErrorType == EyouSoft.HotelBI.ErrorType.系统级错误) { Response.Clear(); Response.Write("查询超时,请重新查询或稍后再试."); Response.End(); return; } hidInterHotel.Value = JsonConvert.SerializeObject(HotelList); if (HotelList != null && HotelList.Count > 0) { this.ExporPageInfoSelect1.intPageSize = pageSize; this.ExporPageInfoSelect1.intRecordCount = respPageInfo != null?respPageInfo.TotalNum:recordCount; this.ExporPageInfoSelect1.CurrencyPage = pageIndex; this.ExporPageInfoSelect1.HrefType = Adpost.Common.ExporPage.HrefTypeEnum.JsHref; this.ExporPageInfoSelect1.AttributesEventAdd("onclick", "FirstPageDataAdd.LoadData(this,\"AjaxInterfaceData.aspx\");", 1); this.ExporPageInfoSelect1.AttributesEventAdd("onchange", "FirstPageDataAdd.LoadData(this,\"AjaxInterfaceData.aspx\");", 0); crptInterList.DataSource = HotelList; crptInterList.DataBind(); HotelList = null; } else { crptInterList.EmptyText = "<tr><td colspan=\"4\"><div style=\"text-align:center; margin-top:75px; margin-bottom:75px;\">暂无数据!</span></div></td></tr>"; ExporPageInfoSelect1.Visible = false; } searchModel = null; } }