123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace LYFZ.Software.MainBusiness.SMSManagement
- {
- public class frmAddSMSTemplate:LYFZ.Software.UI.SMSManagement.frmAddSMSTemplate
- {
-
- public frmAddSMSTemplate() {
- this.Load += frmAddSMSTemplate_Load;
-
- this.cboxEvent.SelectedIndexChanged += cboxEvent_SelectedIndexChanged;
- this.number.Value = 1;
- this.btnSave.Click += btnSave_Click;
- this.Shown += frmAddSMSTemplate_Shown;
- this.linkSelectSms.Click += linkSelectSms_Click;
- this.txtSmsInfo.EventTextBoxEx_TextChanged += txtSmsInfo_EventTextBoxEx_TextChanged;
- this.lbWordCount.Text = SmsSend.FrmSendSms.GetlblNameTextString(0, 0);
-
- }
- void txtSmsInfo_EventTextBoxEx_TextChanged(object sender, EventArgs e)
- {
- string SmsInfo = txtSmsInfo.Text;
- this.lbWordCount.Text = SmsSend.FrmSendSms.GetlblNameTextString(SmsInfo.Length, SmsSend.FrmSendSms.GetSmsSizeCount(SmsInfo.ToString(), SmsSend.FrmSendSms.Works64));
- }
- /// <summary>
- /// 当前短信类别
- /// </summary>
- EnumPublic.SmsCategory sCategory = EnumPublic.SmsCategory.公共短信;
- /// <summary>
- /// 当前短信类别
- /// </summary>
- public EnumPublic.SmsCategory SCategory
- {
- get { return sCategory; }
- set { sCategory = value; }
- }
- void linkSelectSms_Click(object sender, EventArgs e)
- {
- frmSelectSmsInfo selectInfo = new frmSelectSmsInfo();
- if (selectInfo.ShowDialog() == System.Windows.Forms.DialogResult.OK) {
- if (selectInfo.SmsModel.ID > 0)
- {
- this.txtSmsInfo.Text = selectInfo.SmsModel.ST_SMSContent;
- }
- }
- }
- void frmAddSMSTemplate_Shown(object sender, EventArgs e)
- {
- if (this.SmsModel.ID > 0)
- {
- this.cboxEvent.SelectedItem = ((EnumPublic.SmsSendEvent)this.SmsModel.ST_SendEvent).ToString();
- this.SCategory = (EnumPublic.SmsCategory)SmsModel.ST_Category;
-
- }
- this.Text = "添加" + this.SCategory.ToString() + "事件设置";
- }
- LYFZ.DAL.DAL_SMSTemplates smsDal = new DAL.DAL_SMSTemplates();
- LYFZ.Model.Model_SMSTemplates smsModel = new Model.Model_SMSTemplates();
- /// <summary>
- /// 短信对象
- /// </summary>
- public LYFZ.Model.Model_SMSTemplates SmsModel
- {
- get { return smsModel; }
- set { smsModel = value; }
- }
- void btnSave_Click(object sender, EventArgs e)
- {
- if (this.cboxEvent.Text.Length <= 0)
- {
- MessageBoxCustom.Show("请选择短信发送事件");
- return;
- }
- if (this.txtSmsInfo.Text.Length <= 0)
- {
- MessageBoxCustom.Show("请输入短信内容");
- return;
- }
- if (this.txtReceiver.Text.Length <= 0)
- {
- MessageBoxCustom.Show("请输入短信接收手机号");
- return;
- }
- int sumSmsCount = 0;
- try
- {
- sumSmsCount = smsDal.GetRecordCount("ST_Type=1 and ST_DividedShop='" + LYFZ.BLL.BLL_ErpCompanyInfo.CurrentCompanyInfoID.Trim() + "'");
- }
- catch { }
- smsModel.ST_Type = (int)EnumPublic.SmsTemplateType.事件短信;
- smsModel.ST_Title = "";
- smsModel.ST_Category=(int)this.SCategory;
- smsModel.ST_SendChannel = 0;
- smsModel.ST_ReceiveObjects = this.txtReceiver.Text.Trim();
- smsModel.ST_SendEvent = (int)((EnumPublic.SmsSendEvent)Enum.Parse(typeof(EnumPublic.SmsSendEvent), this.cboxEvent.Text));
- smsModel.ST_SMSContent = this.txtSmsInfo.Text;
- smsModel.ST_IsEnabled = this.checkBoxEx1.Checked;
- smsModel.ST_CreateDatetime = SDateTime.Now;
- smsModel.ST_UpdateDatetime = SDateTime.Now;
- smsModel.ST_DividedShop = LYFZ.BLL.BLL_ErpCompanyInfo.CurrentCompanyInfoID;
- if (smsModel.ST_ReceiveObjects.Split(',').Length > 100)
- {
- MessageBoxCustom.Show("最多只能输入100个手机号!");
- return;
- }
- switch (this.CurrentEvent)
- {
- case EnumPublic.SmsSendEvent.每天X时X分发送财务短信到X手机:
- string retMsg = LYFZ.WinAPI.CustomPublicMethod.ValidationPhones(this.txtReceiver.Text.Trim());
- if (retMsg.Trim().Length > 0)
- {
- MessageBoxCustom.Show("手机号输入错误:" + retMsg);
- return;
- }
- this.smsModel.ST_SendEventValue = Convert.ToInt32(this.number.Value).ToString() + ":" + Convert.ToInt32(this.number2.Value).ToString();
- break;
- case EnumPublic.SmsSendEvent.宝宝生日前X天且X岁以下:
- case EnumPublic.SmsSendEvent.宝宝X岁前X天成长跟踪短信:
- this.smsModel.ST_SendEventValue = Convert.ToInt32(this.number.Value).ToString() + ":" + Convert.ToInt32(this.number2.Value).ToString();
- break;
- case EnumPublic.SmsSendEvent.客户来电挂机后X分钟:
- case EnumPublic.SmsSendEvent.未知来电挂机后X分钟:
- case EnumPublic.SmsSendEvent.员工来电挂机后X分钟:
- this.smsModel.ST_SendEventValue = Convert.ToInt32(this.number.Value).ToString() + ":" + ((ItemValue)comBox.SelectedItem).Value.ToString();
- break;
- case EnumPublic.SmsSendEvent.客户云选片完成后发通知短信:
- case EnumPublic.SmsSendEvent.客户云看样完成后发通知短信:
- string retMsg2 = LYFZ.WinAPI.CustomPublicMethod.ValidationPhones(this.txtReceiver.Text.Trim());
- if (retMsg2.Trim().Length > 0)
- {
- MessageBoxCustom.Show("手机号输入错误:" + retMsg2);
- return;
- }
- this.smsModel.ST_SendEventValue = "0";
- break;
- default:
- this.smsModel.ST_SendEventValue = Convert.ToInt32(this.number.Value).ToString();
- break;
- }
- bool ret = false;
- if (smsModel.ID > 0)
- {
- ret = smsDal.Update(smsModel);
- }
- else
- {
- if (sumSmsCount > 1000)
- {
- MessageBoxCustom.Show("对不起,短信设置多只能添加1000条记录,请删除无用短信设置记录后重试。");
- return;
- }
- try
- {
- sumSmsCount = smsDal.GetRecordCount(String.Format("ST_Type=1 and ST_DividedShop='{0}' and ST_Category={3} and ST_SendEvent={1} and ST_SendEventValue='{2}'", LYFZ.BLL.BLL_ErpCompanyInfo.CurrentCompanyInfoID.Trim(), smsModel.ST_SendEvent, this.smsModel.ST_SendEventValue, this.smsModel.ST_Category));
- }
- catch { }
- if (sumSmsCount > 0)
- {
- MessageBoxCustom.Show("对不起,相同类型事件的短信模板已以存在,请不要重复添加。");
- return;
- }
- ret = smsDal.Add(smsModel);
- }
- if (ret)
- {
- MessageBoxCustom.Show("保存成功");
- this.DialogResult = System.Windows.Forms.DialogResult.OK;
- }
- else
- {
- MessageBoxCustom.Show("保存失败,请检查网络环境或关闭后重试。");
- }
- }
- LYFZ.EnumPublic.SmsSendEvent currentEvent = EnumPublic.SmsSendEvent.客人生日前X天;
- /// <summary>
- /// 当前事件
- /// </summary>
- public LYFZ.EnumPublic.SmsSendEvent CurrentEvent
- {
- get { return currentEvent; }
- set { currentEvent = value; }
- }
- LYFZ.ComponentLibrary.NumericUpDownEx number = new ComponentLibrary.NumericUpDownEx();
- LYFZ.ComponentLibrary.NumericUpDownEx number2 = new ComponentLibrary.NumericUpDownEx();
- LYFZ.ComponentLibrary.LabelEx labTxt = new ComponentLibrary.LabelEx();
- LYFZ.ComponentLibrary.LabelEx labTxt2 = new ComponentLibrary.LabelEx();
- LYFZ.ComponentLibrary.ComboBoxEx comBox = new ComponentLibrary.ComboBoxEx();
- void cboxEvent_SelectedIndexChanged(object sender, EventArgs e)
- {
- try
- {
- this.CurrentEvent = (EnumPublic.SmsSendEvent)Enum.Parse(typeof(EnumPublic.SmsSendEvent), this.cboxEvent.Text);
- }
- catch { }
- // LYFZ.ComponentLibrary.TextBoxEx textBox = new ComponentLibrary.TextBoxEx();
-
- this.plEventValue.Controls.Clear();
- number.Maximum=999999;
- number.Minimum=0;
- number.TextAlign= System.Windows.Forms.HorizontalAlignment.Center;
- number.Width = 90;
- number.Font = this.cboxEvent.Font;
- number.Location = new System.Drawing.Point(10, 4);
- labTxt.Text = "分钟";
- labTxt.Width = 60;
- labTxt.Font = this.cboxEvent.Font;
- labTxt.Location = new System.Drawing.Point(number.Location.X + number.Width+5,6);
- comBox.Items.Clear();
- comBox.ReadOnly = true;
- comBox.Width = 90;
- comBox.Font= this.cboxEvent.Font;
- comBox.Location = new System.Drawing.Point(labTxt.Location.X + labTxt.Width, 4);
- comBox.Items.Add(new ItemValue("y","一年内一次"));
- comBox.Items.Add(new ItemValue("m", "一月内一次"));
- comBox.Items.Add(new ItemValue("d", "一天内一次"));
- // comBox.Items.Add(new ItemValue("a", "实时发送"));
- comBox.SelectedIndex = 0;
- number2.Maximum = 59;
- number2.Minimum = 0;
- number2.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
- number2.Width = 90;
- number2.Font = this.cboxEvent.Font;
- number2.Location = new System.Drawing.Point(labTxt.Location.X + labTxt.Width, 4);
- labTxt2.Text = "分";
- labTxt2.Font = this.cboxEvent.Font;
- labTxt2.Location = new System.Drawing.Point(number2.Location.X + number2.Width + 5, 6);
- this.plEventValue.Controls.Add(number);
- this.plEventValue.Controls.Add(labTxt);
- labTxt.Text = "分钟";
- this.lbTips.Text = GetControlPropertyAttribute(this.CurrentEvent);
- this.txtSmsInfo.ReadOnly = false;
- this.linkSelectSms.Enabled = true;
- this.txtReceiver.ReadOnly = true;
- this.txtReceiver.Text = "相关客户";
- if (smsModel.ID > 0)
- {
- this.txtReceiver.Text = SmsModel.ST_ReceiveObjects;
- this.txtSmsInfo.Text = SmsModel.ST_SMSContent;
- SetSendEventValue(SmsModel.ST_SendEventValue);
- this.checkBoxEx1.Checked = this.SmsModel.ST_IsEnabled;
-
- }
- if (this.CurrentEvent != EnumPublic.SmsSendEvent.每天X时X分发送财务短信到X手机)
- {
- if (this.txtSmsInfo.Text.Trim() == "系统自动生成")
- {
- this.txtSmsInfo.Text = "";
- }
- }
- switch (this.CurrentEvent)
- {
- case EnumPublic.SmsSendEvent.客人订单后X分钟:
- case EnumPublic.SmsSendEvent.订单件齐后X分钟发送取件通知:
- case EnumPublic.SmsSendEvent.拍照预约后X分钟:
- case EnumPublic.SmsSendEvent.拍照完成后X分钟:
- case EnumPublic.SmsSendEvent.服务预约后X分钟:
- case EnumPublic.SmsSendEvent.服务完成后X分钟:
- case EnumPublic.SmsSendEvent.客人预约选片后X分钟:
- case EnumPublic.SmsSendEvent.客人选片完成后X分钟:
- case EnumPublic.SmsSendEvent.客人预约看样后X分钟:
- case EnumPublic.SmsSendEvent.客人看样后X分钟:
- case EnumPublic.SmsSendEvent.客人取件后X分钟:
- case EnumPublic.SmsSendEvent.转介绍后X分钟发送短信给介绍人:
- case EnumPublic.SmsSendEvent.发放会员卡后X分钟发会员短信:
- case EnumPublic.SmsSendEvent.现金卡消费后X分钟后发提醒短信:
- case EnumPublic.SmsSendEvent.现金卡充值后X分钟后发提醒短信:
- case EnumPublic.SmsSendEvent.来单录入后X分钟:
- case EnumPublic.SmsSendEvent.会员积分变动后X分钟:
- case EnumPublic.SmsSendEvent.删除会员后X分钟:
- case EnumPublic.SmsSendEvent.注消会员后X分钟:
- case EnumPublic.SmsSendEvent.修改会员支付密码后X分钟:
- case EnumPublic.SmsSendEvent.会员服务卡使用后X分钟:
- case EnumPublic.SmsSendEvent.礼服出租订单后X分钟:
- case EnumPublic.SmsSendEvent.礼服出租还衣后X分钟:
- case EnumPublic.SmsSendEvent.礼服出售订单后X分钟:
- case EnumPublic.SmsSendEvent.积分兑换后X分钟发提醒短信:
- case EnumPublic.SmsSendEvent.会员返现卡提现后X分钟:
- case EnumPublic.SmsSendEvent.会员返现卡获得返现金后X分钟:
- case EnumPublic.SmsSendEvent.支付成功后X分钟发提醒消息:
- case EnumPublic.SmsSendEvent.客片上传完成后X分钟发通知短信:
- labTxt.Text = "分钟";
- this.txtReceiver.Text = "相关客户";
- break;
- case EnumPublic.SmsSendEvent.客户来电挂机后X分钟:
- case EnumPublic.SmsSendEvent.未知来电挂机后X分钟:
- this.plEventValue.Controls.Add(comBox);
- this.plEventValue.Controls.Add(labTxt2);
- labTxt2.Text = "发送周期";
- labTxt.Text = "分钟";
- this.txtReceiver.Text = "相关客户";
- break;
- case EnumPublic.SmsSendEvent.礼服出租还衣前X天:
- case EnumPublic.SmsSendEvent.礼服出租取衣前X天:
- case EnumPublic.SmsSendEvent.礼服出售取衣前X天:
- case EnumPublic.SmsSendEvent.客人生日前X天:
- case EnumPublic.SmsSendEvent.客人婚礼前X天:
- case EnumPublic.SmsSendEvent.结婚纪念日前X天:
- case EnumPublic.SmsSendEvent.宝宝生日前X天:
- case EnumPublic.SmsSendEvent.宝宝X天成长跟踪短信:
- case EnumPublic.SmsSendEvent.家长生日前X天:
- case EnumPublic.SmsSendEvent.怀孕X天周期跟踪短信:
- case EnumPublic.SmsSendEvent.会员积分有效期到期前X天:
- case EnumPublic.SmsSendEvent.会员储值有效期到期前X天:
- case EnumPublic.SmsSendEvent.会员服务套餐有效期到期前X天:
- case EnumPublic.SmsSendEvent.会员新摄会有效期到期前X天:
- case EnumPublic.SmsSendEvent.会员返现卡有效期到期前X天:
- case EnumPublic.SmsSendEvent.拍照预约后拍照前X天:
- case EnumPublic.SmsSendEvent.服务预约后服务前X天:
- case EnumPublic.SmsSendEvent.选片预约后选片前X天:
- case EnumPublic.SmsSendEvent.看样预约后看样前X天:
- labTxt.Text = "天";
- this.txtReceiver.Text = "相关客户";
- break;
- case EnumPublic.SmsSendEvent.宝宝生日前X天且X岁以下:
- labTxt.Text = "天";
- this.txtReceiver.Text = "相关客户";
- this.plEventValue.Controls.Add(number2);
- this.plEventValue.Controls.Add(labTxt2);
- labTxt2.Text = "岁以下";
- break;
- case EnumPublic.SmsSendEvent.员工生日前X天:
- labTxt.Text = "天";
- this.txtReceiver.Text = "相关员工";
- break;
- case EnumPublic.SmsSendEvent.员工来电挂机后X分钟:
- this.plEventValue.Controls.Add(comBox);
- this.plEventValue.Controls.Add(labTxt2);
- labTxt2.Text = "发送周期";
- labTxt.Text = "分钟";
- this.txtReceiver.Text = "相关员工";
- break;
- case EnumPublic.SmsSendEvent.宝宝X岁前X天成长跟踪短信:
- labTxt.Text = "岁 前";
- this.txtReceiver.Text = "相关客户";
- this.plEventValue.Controls.Add(number2);
- this.plEventValue.Controls.Add(labTxt2);
- labTxt2.Text = "天";
- break;
- case EnumPublic.SmsSendEvent.当积分接近X的百分之80时:
- case EnumPublic.SmsSendEvent.当积分达到或超过X分时:
- labTxt.Text = "分";
- this.txtReceiver.Text = "相关客户";
- break;
- case EnumPublic.SmsSendEvent.每天X时X分发送财务短信到X手机:
- labTxt.Text = "时";
- this.plEventValue.Controls.Add(number2);
- this.plEventValue.Controls.Add(labTxt2);
- labTxt2.Text = "分";
- this.txtSmsInfo.ReadOnly = true;
- this.txtSmsInfo.Text = "系统自动生成";
- this.txtReceiver.ReadOnly = false;
- this.linkSelectSms.Enabled = false;
- if (this.txtReceiver.Text.Trim().Contains("相关"))
- {
- this.txtReceiver.Text = "";
- }
- this.lbTips.Text = "";
- break;
- case EnumPublic.SmsSendEvent.员工生日前X天发送短信给X手机号:
- labTxt.Text = "天";
- this.txtReceiver.ReadOnly = false;
- this.linkSelectSms.Enabled = true;
- if (this.txtReceiver.Text.Trim().Contains("相关"))
- {
- this.txtReceiver.Text = "";
- }
- break;
- case EnumPublic.SmsSendEvent.女宾生日前X天发短信给男宾:
- case EnumPublic.SmsSendEvent.男宾生日前X天发短信给女宾:
- labTxt.Text = "天";
- this.txtReceiver.Text = "相关客户";
- break;
- case EnumPublic.SmsSendEvent.客户云选片完成后发通知短信:
- case EnumPublic.SmsSendEvent.客户云看样完成后发通知短信:
- this.plEventValue.Controls.Clear();
- this.txtReceiver.ReadOnly = false;
- if (this.txtReceiver.Text.Trim().Contains("相关"))
- {
- this.txtReceiver.Text = "";
- }
- break;
- }
- }
- /// <summary>
- /// 设置事件值
- /// </summary>
- /// <param name="value"></param>
- void SetSendEventValue(string value)
- {
- int i = 0;
- if (value.Trim().Length > 0)
- {
- if (int.TryParse(value, out i))
- {
- this.number.Value = i;
- }
- else if (value.Contains(":"))
- {
- string[] tempIs = value.Split(':');
- if (tempIs.Length > 0) {
- if (int.TryParse(tempIs[0], out i))
- {
- this.number.Value = i;
- }
- }
- if (tempIs.Length > 1)
- {
- if (int.TryParse(tempIs[1], out i))
- {
- this.number2.Value = i;
- }
- else if (tempIs[1].Trim().Length==1)
- {
- switch (tempIs[1].Trim())
- {
- case "y":
- comBox.SelectedIndex = 0;
- break;
- case "m":
- comBox.SelectedIndex = 1;
- break;
- case "d":
- comBox.SelectedIndex = 2;
- break;
- case "a":
- comBox.SelectedIndex = 3;
- break;
-
- }
- }
- }
- }
- }
- }
- /// <summary>
- /// 获取事件的说明属性信息
- /// </summary>
- /// <param name="sEvent"></param>
- /// <returns></returns>
- string GetControlPropertyAttribute(EnumPublic.SmsSendEvent sEvent)
- {
- string ret = LYFZ.WinAPI.CustomPublicMethod.ConvertEnumToDescription(sEvent);
- if (!ret.Contains("说明:")) {
- ret = "说明:“XXX先生/女士”、“XXX先生”、“XXX女士”为客户姓名和称呼";
- }
- string XXBString = "";
- if (SCategory == EnumPublic.SmsCategory.儿童短信)
- {
- if (!ret.Contains("XXB"))
- {
- XXBString = "、XXB 为宝宝(儿童)名字 ";
- }
- }
- if (sEvent == EnumPublic.SmsSendEvent.客户云选片完成后发通知短信 || sEvent == EnumPublic.SmsSendEvent.客户云看样完成后发通知短信)
- {
- return ret.Replace(":XXX", ":“XXX先生/女士”、“XXX先生”、“XXX女士”").Replace("姓名;", "姓名和称呼;")
- + " \r\n[注意替换代码一定要大写,客人称呼为“先生/女士”]";
- }
- else
- {
- return ret.Replace(":XXX", ":“XXX先生/女士”、“XXX先生”、“XXX女士”").Replace("姓名;", "姓名和称呼;")
- + "\r\nXXSPDM 为店名、XXSPTEL 为本店电话、XXSPDZ 为本店地址、XXSPDZM 为本店店长 "//XXSPWZ 为本店网址、
- + XXBString
- + " \r\n[注意替换代码一定要大写,客人称呼为“先生/女士”]";
- }
- }
- void frmAddSMSTemplate_Load(object sender, EventArgs e)
- {
- BindSendEvent();
-
- }
- /// <summary>
- /// 邦定短信事件
- /// </summary>
- void BindSendEvent()
- {
- this.cboxEvent.Items.Clear();
- this.cboxEvent.DataSource = GetEventList(this.SCategory);
- }
- List<string> GetEventList(EnumPublic.SmsCategory _SCategory)
- {
- List<string> elist = new List<string>();
- string[] arrys = Enum.GetNames(typeof(LYFZ.EnumPublic.SmsSendEvent));
- int[] continueValues = new int[] { 120, 121, 107, 108, 109, 110 };
- foreach (string sName in arrys)
- {
- LYFZ.EnumPublic.SmsSendEvent sEvent = (LYFZ.EnumPublic.SmsSendEvent)Enum.Parse(typeof(LYFZ.EnumPublic.SmsSendEvent), sName);
- int value = (int)sEvent;
- //用于调整“订单件齐后X分钟发送取件通知”的位置
- if (sEvent == EnumPublic.SmsSendEvent.订单件齐后X分钟发送取件通知) { continue; }
- if (_SCategory != EnumPublic.SmsCategory.公共短信
- && _SCategory != EnumPublic.SmsCategory.医院跟踪短信
- && _SCategory != EnumPublic.SmsCategory.礼服管理短信
- && sEvent == EnumPublic.SmsSendEvent.客人取件后X分钟)
- {
- elist.Add(EnumPublic.SmsSendEvent.订单件齐后X分钟发送取件通知.ToString());
- }
- // if (value == 120 || value == 121)
- if(continueValues.Any(i=>i==value))
- {
- continue;
- }
- //end
- switch (_SCategory)
- {
- case EnumPublic.SmsCategory.公共短信:
- if ((value > 900 && value < 9990) || value == 114)
- {
- elist.Add(sEvent.ToString());
- }
- break;
- case EnumPublic.SmsCategory.婚纱短信:
- if ((value < 200 || (value >= 300 && value < 400)) && value != 114)
- {
- elist.Add(sEvent.ToString());
- }
- break;
- case EnumPublic.SmsCategory.儿童短信:
- if (value < 300 && value != 114)
- {
- elist.Add(sEvent.ToString());
- }
- break;
- case EnumPublic.SmsCategory.写真短信:
- if (value < 200 && value != 114)
- {
- elist.Add(sEvent.ToString());
- }
- break;
- case EnumPublic.SmsCategory.医院跟踪短信:
- if (value == 217 || value == 218 || value == 219 || value == 9991 || value == 9992)
- {
- elist.Add(sEvent.ToString());
- }
- break;
- case EnumPublic.SmsCategory.婚庆订单短信:
- case EnumPublic.SmsCategory.服务订单短信:
- if ((value > 400 && value < 500) || value == 100 || value == 101 || value == 106)
- {
- if (value != 450)
- {
- if (value == 451)
- {
- elist.Insert(1, EnumPublic.SmsSendEvent.服务预约后X分钟.ToString());
- elist.Insert(2, sEvent.ToString());
- }
- else
- {
- elist.Add(sEvent.ToString());
- }
- }
- }
- break;
- case EnumPublic.SmsCategory.礼服管理短信:
- if ((value > 800 && value < 900))
- {
- elist.Add(sEvent.ToString());
- }
- break;
- }
- }
- switch (_SCategory)
- {
- case EnumPublic.SmsCategory.婚纱短信:
- case EnumPublic.SmsCategory.儿童短信:
- case EnumPublic.SmsCategory.写真短信:
- elist.Insert(3, EnumPublic.SmsSendEvent.服务预约后X分钟.ToString());
- elist.Insert(4, EnumPublic.SmsSendEvent.服务完成后X分钟.ToString());
- elist.Insert(5, EnumPublic.SmsSendEvent.客人预约选片后X分钟.ToString());
- elist.Insert(7, EnumPublic.SmsSendEvent.客人预约看样后X分钟.ToString());
- elist.Insert(2, EnumPublic.SmsSendEvent.拍照预约后拍照前X天.ToString());
- elist.Insert(5, EnumPublic.SmsSendEvent.服务预约后服务前X天.ToString());
- elist.Insert(8, EnumPublic.SmsSendEvent.选片预约后选片前X天.ToString());
- elist.Insert(11, EnumPublic.SmsSendEvent.看样预约后看样前X天.ToString());
- break;
- case EnumPublic.SmsCategory.婚庆订单短信:
- case EnumPublic.SmsCategory.服务订单短信:
- elist.Insert(2, EnumPublic.SmsSendEvent.服务预约后服务前X天.ToString());
- break;
- }
- return elist;
- }
- }
- }
|