using System; using System.Configuration; using System.Windows.Forms; using SuperMap.RealEstate.ServiceModel; using HZQR.Common; namespace ZJZCGCMemberClient { public partial class MainForm : Form { public MainForm() { InitializeComponent(); } private void MainForm_Load(object sender, EventArgs e) { Transaction transaction = new Transaction(); try { LogUtil.WriteLog("///------------开始同步数据------------///"); string LastDateTimeStore = ConfigurationManager.AppSettings["LastDateTimeStore"]; string LastDateTimeGoods = ConfigurationManager.AppSettings["LastDateTimeGoods"]; //string LastDateTimeMember = ConfigurationManager.AppSettings["LastDateTimeMember"]; //同步门店表数据 //Method.BaseInfoHelper.SynchroShopInfo(transaction, LastDateTimeStore); //同步商品表数据 Method.BaseInfoHelper.SynchroWholeGoods(transaction, LastDateTimeGoods); //Method.BaseInfoHelper.SynchroWholeGoods(transaction); //同步会员表数据 //Method.MembershipHelper.SyncMembershipInfo(transaction, LastDateTimeMember); LogUtil.WriteLog("///------------数据同步结束------------///"); //关闭窗口 this.Close(); } catch (Exception ex) { LogUtil.WriteLog(ex, "", DateTime.Now.ToString("yyyyMMdd") + "_ErrorLog"); } finally { transaction.Release(); transaction.Dispose(); } } private void BtnUploadWholeStore_Click(object sender, EventArgs e) { Transaction transaction = new Transaction(); try { //同步门店表数据 Method.BaseInfoHelper.SynchroWholeShop(transaction); } catch (Exception ex) { LogUtil.WriteLog(ex, "", DateTime.Now.ToString("yyyyMMdd") + "_ErrorLog"); } finally { transaction.Release(); transaction.Dispose(); } } private void BtnEncrypt_Click(object sender, EventArgs e) { textBox2.Text = ZJZCGCMemberHelper.AESEncrypt(textBox1.Text, ZJZCGCMemberHelper.AppSecret, "", true); } private void BtnDecrypt_Click(object sender, EventArgs e) { textBox2.Text = ZJZCGCMemberHelper.AESDecrypt(textBox1.Text, ZJZCGCMemberHelper.AppSecret, "", true); } } }