123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- namespace LYFZ.ManagementService
- {
- public partial class frmMain : LYFZ.ComponentLibrary.BaseFormRelease
- {
- public frmMain()
- {
- /* //验证手机号
- string RecipientPhone = "";
- string ErrorPhone = LYFZ.WinAPI.CustomPublicMethod.ValidationPhones("13430206042,13790621789,13811204686,15817080482,15818476364,18688613497,18820112855,18825162598", ref RecipientPhone);
- string[] phones = RecipientPhone.Split(',');
- string tempSMSContent = "您好,玛雅社拍摄前注意事项∶ 1.今天晚上两位清洗好头发,不打发胶; 2.先生剃掉胡须,小姐处理腋下,手毛; 3.小姐穿浅色打底裤(防止走光);穿浅色高跟鞋; 4.需要准备防晒霜,防蚊水,以免晒伤和被蚊虫叮伤; 5.先生带黑色皮鞋,皮带,黑色袜子,喜欢的衬衣和西装可带上。如高跟鞋,皮鞋没有的情况下我们可为亲准备; 6.小姐鞋码数大于39码需自行准备;先生鞋码大于44码需自行准备; 7.如有纪念意义的物品,服装可以带过来拍摄纪念; 8.拍摄当天请不要带陪同; 9.自驾车顾客请提前把车尾箱清空; 10.拍摄前一天晚上请早点休息,拍摄当天保持精神饱满,愉快心情; 11.明天早上8:00准时到玛雅社芳村总店,总店地址∶广州荔湾区芳村大道东200号1850创意园67栋,联系电话是∶81775892为了不影响您的拍摄行程,请务必准时! 12.此信息是系统统一发送,不必回复。祝您幸福愉快回TD退订【玛雅社】";
- //代理扣费(条数)
- int AgentChargeback = LYFZ.WinAPI.CustomPublicMethod.GetSendSmsCount(ref tempSMSContent, "【玛雅社】");
- //此句作用为多处理一次短信内容
- LYFZ.WinAPI.CustomPublicMethod.GetSendSmsCount(ref tempSMSContent, "【玛雅社】");
- AgentChargeback = AgentChargeback * phones.Length;
- if (ErrorPhone != null && ErrorPhone.Trim().Length > 0)
- {
- AgentChargeback = AgentChargeback * (phones.Length + ErrorPhone.Trim().Split(',').Length);
- }
- LYFZ.MandaoSmsInterface.HTTPSmsSendReturnInfo sendifno = new LYFZ.MandaoSmsInterface.HTTPSmsSendReturnInfo("081007051150896049", tempSMSContent.Trim().Length, RecipientPhone.Split(',').Length);
- MessageBox.Show(sendifno.SendCount.ToString());*/
- /* 触发,通知,帐号1:SDK-BBX-010-24581
- 密码:6)a51-b)
- 特服号:297533
- * 920982ae84dce71e51f3d6cd1884a8ee
- sn=SDK-BBX-010-24581&pwd=920982AE84DCE71E51F3D6CD1884A8EE
- 营销,帐号2:SDK-BBX-010-24582
- 密码:1b-e06A-
- 特服号:297534 */
- //string pwdmd5 = LYFZ.Command.Command_MD5.md5("SDK-BBX-010-24581" + "6)a51-b)").ToUpper();
- // string fff = "庆六一微笑宝贝电影主题《奇幻森林》荣耀发布!只需6.1元即可抢先拍摄体验!详情加客服微信了解,微信号:wxbbkefu-02 h【微笑宝贝】";
- // string tempSMSContent = fff;
- //代理扣费(条数)
- // int AgentChargeback = LYFZ.WinAPI.CustomPublicMethod.GetSendSmsCount(ref tempSMSContent, "【微笑宝贝】");
- /* LYFZ.Model.Model_SMSAccountInformation sMSAccountInformation = new Model.Model_SMSAccountInformation();
- sMSAccountInformation.SingleUid = LYFZ.DAL.DAL_Config.ConfigModel.MandaoAccount;
- sMSAccountInformation.SinglePwd = LYFZ.DAL.DAL_Config.ConfigModel.MandaoPassword;
- sMSAccountInformation.SingleRechargeRemindbalance = LYFZ.DAL.DAL_Config.ConfigModel.RechargeRemindbalanceMandao;
- sMSAccountInformation.SingleRechargeRemindPhone = LYFZ.DAL.DAL_Config.ConfigModel.RechargeRemindPhoneMandao;
- sMSAccountInformation.SwitchingCondition = LYFZ.DAL.DAL_Config.ConfigModel.Mandao_SwitchingCondition;
- sMSAccountInformation.BulkUid = LYFZ.DAL.DAL_Config.ConfigModel.MandaoAccount_Bulk;
- sMSAccountInformation.BulkPwd = LYFZ.DAL.DAL_Config.ConfigModel.MandaoPassword_Bulk;
- sMSAccountInformation.BulkRechargeRemindbalance = LYFZ.DAL.DAL_Config.ConfigModel.RechargeRemindbalanceMandao_Bulk;
- sMSAccountInformation.BulkRechargeRemindPhone = LYFZ.DAL.DAL_Config.ConfigModel.RechargeRemindPhoneMandao_Bulk;
- // bool retbl = LYFZ.MandaoSmsInterface.HTTPSmsInterface.CheckConnect("http://sdk2.entinfo.cn:8061/");
- // LYFZ.MandaoSmsInterface.HTTPSmsInterface.SendSmsMessages(sMSAccountInformation.SingleUid, sMSAccountInformation.SinglePwd,"13669511419","我是测试短信,我又来了!【利亚方舟】");
- LYFZ.MandaoSmsInterface.HTTPSmsInterface.SendSmsMessagesPOST(sMSAccountInformation.SingleUid, sMSAccountInformation.SinglePwd, "13669511419", "感谢您的参与,稍后客服将致电您并为您介绍详细的优惠券使用情况【利亚方舟】");
- */
- InitializeComponent();
-
- this.Shown += frmMain_Shown;
- this.Load += frmMain_Load;
- }
- void frmMain_Load(object sender, EventArgs e)
- {
- // 利亚方舟软件用户管理系统V7.151121
- //string vnumber = Application.ProductVersion.Replace(".", "");
- this.Text = "利亚方舟软件用户管理系统 V" + Application.ProductVersion;
- }
- void InitializeShowFrm()
- {
- this.ShowEmbedChildForm(new frmUserManager());
- SetThisButton(this.gbtnUserManager);
- this.WindowState = FormWindowState.Maximized;
- }
- void frmMain_Shown(object sender, EventArgs e)
- {
- if (LYFZ.DAL.tb_Users.UsersModel == null)
- {
- frmLogin frm = new frmLogin();
- if (frm.ShowDialog() == DialogResult.OK)
- {
- InitializeShowFrm();
- }
- else
- {
- this.Close();
- }
- }
- else {
- InitializeShowFrm();
- }
- }
- public void SetThisButton(LYFZ.ComponentLibrary.GlassButton gbtn)
- {
- foreach (Control control in this.Controls)
- {
- if (control.GetType().Equals(gbtn.GetType()))
- {
- LYFZ.ComponentLibrary.GlassButton selectGbtn = (LYFZ.ComponentLibrary.GlassButton)control;
- selectGbtn.ThisButton = false;
- }
- }
- gbtn.ThisButton = true;
- }
- #region 加载显示窗体
- /// <summary>
- /// 嵌入式显示
- /// </summary>
- /// <param name="newfrm">要显示的窗体对象</param>
- /// <returns></returns>
- public void ShowEmbedChildForm(LYFZ.ComponentLibrary.BaseContentsFormMain newfrm)
- {
- string frmKey = newfrm.Name;
- LYFZ.ComponentLibrary.BaseContentsFormMain frm = GetSortedListInForm(frmKey);
- if (frm == null)
- {
- frm = newfrm;
- sFormList.Add(frmKey, frm);
- ShowEmbedChildForm(frm, this.plFormMainContent.Controls);
- }
- else
- {
- frm.Show();
- }
- }
- /// <summary>
- /// 嵌入式显示
- /// </summary>
- /// <param name="frm">要显示的窗体</param>
- /// <param name="controls">父控件集合</param>
- /// <returns></returns>
- public LYFZ.ComponentLibrary.BaseContentsFormMain ShowEmbedChildForm(LYFZ.ComponentLibrary.BaseContentsFormMain frm, System.Windows.Forms.Control.ControlCollection controls)
- {
- System.GC.Collect();
- // frm.Name = "frmContainerMain";
- frm.TopLevel = false;
- frm.IsShadow = false;
- frm.MaximizeBox = false;
- frm.MinimizeBox = false;
- frm.IsShowCloseBox = false;
- frm.TitleBgImageHeight = 0;
- frm.BottomBgImageHeight = 0;
- frm.IsMaximized = false;
- frm.FormMobile = false;
- frm.IsUserControlsSize = false;
- frm.Dock = System.Windows.Forms.DockStyle.Fill;
- frm.IsCustomScrollBar = true;
- for (int i = 0; i < controls.Count; i++)
- {
- controls[i].Dispose();
- }
- controls.Clear();
- controls.Add(frm);
- frm.Show();
- return frm;
- }
- /// <summary>
- /// 已显示过的所有窗体集合
- /// </summary>
- private SortedList<string, LYFZ.ComponentLibrary.BaseContentsFormMain> sFormList = new SortedList<string, ComponentLibrary.BaseContentsFormMain>();
- /// <summary>
- /// 从SortedList集合中获取已显示过的所有窗体
- /// </summary>
- /// <param name="key"></param>
- /// <returns></returns>
- public LYFZ.ComponentLibrary.BaseContentsFormMain GetSortedListInForm(string key)
- {
- try
- {
- LYFZ.ComponentLibrary.BaseContentsFormMain frm = sFormList[key];
- if (frm.IsDisposed)
- {
- frm = null;
- sFormList.Remove(key);
- }
- return frm;
- }
- catch
- {
- return null;
- }
- }
- #endregion
- private void gbtnUserManager_Click(object sender, EventArgs e)
- {
- this.ShowEmbedChildForm(new frmUserManager());
- SetThisButton(this.gbtnUserManager);
- }
- private void gbtnSMSManagement_Click(object sender, EventArgs e)
- {
- this.ShowEmbedChildForm(new frmSMSManager());
- SetThisButton(this.gbtnSMSManagement);
- }
- private void gbtnTerminalConnect_Click(object sender, EventArgs e)
- {
- this.ShowEmbedChildForm(new frmTerminalConnect());
- SetThisButton(this.gbtnTerminalConnect);
- }
- private void gbtnLogs_Click(object sender, EventArgs e)
- {
- this.ShowEmbedChildForm(new frmSystemLogs());
- SetThisButton(this.gbtnLogs);
- }
- private void gbtnSystem_Click(object sender, EventArgs e)
- {
- this.ShowEmbedChildForm(new frmSystemSetting());
- SetThisButton(this.gbtnSystem);
- }
- private void gbtnSMSFilter_Click(object sender, EventArgs e)
- {
- this.ShowEmbedChildForm(new frmFilterMobileNumber());
- SetThisButton(this.gbtnSMSFilter);
- }
- }
- }
|