Exemplo n.º 1
0
        //获取会员日费率设置
        private StructDictItem GetMemberAwardSetting(int id)
        {
            int    index    = this.comboBoxEdit3.SelectedIndex;
            string recharge = this.mRechargeTextEdit.Text;
            string give     = this.mGiveTextEdit.Text;
            string start    = this.mstartTime;
            string end      = this.mendTime;

            if (index < 0 ||
                recharge.Equals(this.mRechargeTextEdit.Properties.NullText) ||
                give.Equals(this.mGiveTextEdit.Properties.NullText) ||
                start.Equals("") ||
                end.Equals(""))
            {
                return(null);
            }

            string code = this.memberTypes[index].typeId.ToString();

            StructDictItem.Builder item = new StructDictItem.Builder();
            item.Code = 0;
            item.Id   = id;
            item.AddItem(code);
            item.AddItem(recharge);
            item.AddItem(give);
            item.AddItem(start);
            item.AddItem(end);
            return(item.Build());
        }
Exemplo n.º 2
0
        private void SaveSetting_Click(object sender, EventArgs e)
        {
            try
            {
                if (sender.Equals(this.defaultButton))
                {
                    StructDictItem.Builder item = new StructDictItem.Builder(this.items[0]);
                    item.ClearItem();
                    string item1 = this.dRechargeText.Text.Equals("") ? "0" : this.dRechargeText.Text;
                    string item2 = this.dRechargeItText.Text.Equals("") ? "0" : this.dRechargeItText.Text;
                    string item3 = this.staffPjItText.Text.Equals("") ? "0" : this.staffPjItText.Text;
                    string item4 = this.netBarPjItText.Text.Equals("") ? "0" : this.netBarPjItText.Text;
                    string item5 = this.logItText.Text.Equals("") ? "0" : this.logItText.Text;
                    string item6 = this.bingingItText.Text.Equals("") ? "0" : this.bingingItText.Text;

                    item.AddItem(item1);
                    item.AddItem(item2);
                    item.AddItem(item3);
                    item.AddItem(item4);
                    item.AddItem(item5);
                    item.AddItem(item6);
                    RateManageNetOperation.UpdateIntegralDefaultSetting(UpdateIntegralDefaultSettingResult, item.Build());
                }
                else if (sender.Equals(this.activeButton))
                {
                    StructDictItem.Builder item = new StructDictItem.Builder(items[1]);
                    item.ClearItem();

                    string item1 = this.aRechargeText.Text.Equals("") ? "0" : this.aRechargeText.Text;
                    string item2 = this.aRechargItText.Text.Equals("") ? "0" : this.aRechargItText.Text;

                    string item3 = this.startComboBoxEdit.DateTime.ToString("yyyy-MM-dd");
                    string item4 = this.endComboBoxEdit.DateTime.ToString("yyyy-MM-dd");
                    if (item3.Equals("") || item4.Equals(""))
                    {
                        return;
                    }
                    item.AddItem(item1);
                    item.AddItem(item2);
                    item.AddItem(item3);
                    item.AddItem(item4);
                    RateManageNetOperation.UpdateIntegralDefaultSetting(UpdateIntegralDefaultSettingResult, item.Build());
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("出现错误请稍后重试");
            }
        }
Exemplo n.º 3
0
        //添加推送事项
        private void addPushButton_Click(object sender, EventArgs e)
        {
            //保存当前的
            SaveCurrentSetting();
            //进行添加推送事项
            StructDictItem.Builder item = new StructDictItem.Builder();
            item.Code = 0;
            item.Id   = 0;
            string areaName = (new Random().Next() % 111) + "xxx事项";
            string content  = "请在此编辑推送的短信内容";

            item.AddItem(areaName);
            item.AddItem(content);
            SystemManageNetOperation.AddSmsPushMessage(AddSmsPushMessage, item.Build());
        }
Exemplo n.º 4
0
        private void UpdateArea_ButtonClick(object sender, EventArgs e)
        {
            if (this.selectArea == null)
            {
                return;
            }

            string areaName = "";

            using (MessageForm form = new MessageForm(""))
            {
                if (form.ShowDialog() == DialogResult.OK)
                {
                    areaName = form.InputText;
                }
            }
            if (areaName.Equals(""))
            {
                return;
            }

            int index = (int)this.selectArea.Tag;

            StructDictItem.Builder update = new StructDictItem.Builder(this.areas[index]);
            update.ItemList.Clear();
            update.AddItem(areaName);
            SystemManageNetOperation.UpdateArea(UpdateAreaResult, update.Build());
        }
Exemplo n.º 5
0
        //保存等级信息
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            //保存
            //等级名称
            string productType = this.typeTextEdit.Text;

            if (productType.Equals(""))
            {
                return;
            }
            if (this.item == null)
            {
                StructDictItem.Builder temitem = new StructDictItem.Builder()
                {
                    Id   = 0,
                    Code = 0,
                };
                temitem.AddItem(productType);

                SystemManageNetOperation.AddProductType(AddProductTypeResult, temitem.Build());
            }
            else
            {
                StructDictItem.Builder temitem = new StructDictItem.Builder(this.item);
                temitem.ClearItem();
                temitem.AddItem(productType);
                SystemManageNetOperation.UpdateProductType(UpdateProductTypeResult, temitem.Build());
            }
        }
Exemplo n.º 6
0
        //保存基本设置
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            string item1 = this.textEdit1.Text;
            string item2 = this.textEdit2.Text;
            string item3 = this.textEdit3.Text;
            string item4 = this.textEdit4.Text;
            string item5 = this.textEdit5.Text;

            StructDictItem.Builder item = new StructDictItem.Builder(clientItem);
            item.ClearItem();
            item.AddItem(item1);
            item.AddItem(item2);
            item.AddItem(item3);
            item.AddItem(item4);
            item.AddItem(item5);

            this.clientItem = item.Build();
            SystemManageNetOperation.UpdateClient(UpdateClientResult, clientItem);
        }
Exemplo n.º 7
0
        private void SaveSetting_Click(object sender, EventArgs e)
        {
            try
            {
                StructDictItem.Builder item = new StructDictItem.Builder(items[0]);
                item.ClearItem();

                string item1 = this.pwCheckEdit.Checked ? "1" : "0";
                string item2 = this.pwTextEdit.Text.Equals("") ? "0" : this.pwTextEdit.Text;
                item.AddItem(item1);
                item.AddItem(item2);

                SystemManageNetOperation.UpdatePwSetting(UpdatePwSettingResult, item.Build());
            }
            catch (Exception ex)
            {
                MessageBox.Show("出现错误请稍后重试");
            }
        }
Exemplo n.º 8
0
        private void SaveSetting_Click(object sender, EventArgs e)
        {
            try
            {
                StructDictItem.Builder item = new StructDictItem.Builder(items[0]);
                item.ClearItem();
                string item1 = this.memberCheckEdit.Checked?"1":"0";
                string item2 = this.memberMinuteText.Text.Equals("") ? "0" : this.memberMinuteText.Text;
                string item3 = this.temCheckEdit.Checked ? "1" : "0";
                string item4 = this.temMinuteText.Text.Equals("") ? "0" : this.temMinuteText.Text;

                item.AddItem(item1);
                item.AddItem(item2);
                item.AddItem(item3);
                item.AddItem(item4);
                System.Console.WriteLine(item);
                RateManageNetOperation.UpdateOtherSetting(UpdateOtherSettingResult, item.Build());
            }
            catch (Exception ex)
            {
                MessageBox.Show("出现错误请稍后重试");
            }
        }
Exemplo n.º 9
0
        //添加欢迎辞
        private void simpleButton2_Click(object sender, EventArgs e)
        {
            string wecome = this.textBox1.Text;

            if (wecome.Equals(""))
            {
                return;
            }

            StructDictItem.Builder item = new StructDictItem.Builder();
            item.Id   = 0;
            item.Code = 0;
            item.AddItem(wecome);
            SystemManageNetOperation.AddClientWecome(AddClientWecomeResult, item.Build());
        }
Exemplo n.º 10
0
        //保存等级信息
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            //保存
            //等级名称
            string memberType = this.typeTextEdit.Text;
            string recharge   = this.rechargeTextEdit.Text;
            string integral   = this.integralTextEdit.Text;

            if (memberType.Equals("") || recharge.Equals("") || integral.Equals(""))
            {
                return;
            }
            if (this.item == null)
            {
                StructDictItem.Builder temitem = new StructDictItem.Builder()
                {
                    Id   = 0,
                    Code = 0,
                };
                temitem.AddItem(memberType);
                temitem.AddItem(recharge);
                temitem.AddItem(integral);
                SystemManageNetOperation.AddMemberLv(AddMemberLvResult, temitem.Build());
            }
            else
            {
                StructDictItem.Builder temitem = new StructDictItem.Builder(this.item);
                temitem.ClearItem();
                temitem.AddItem(memberType);
                temitem.AddItem(recharge);
                temitem.AddItem(integral);
                SystemManageNetOperation.UpdateMemberLvSetting(UpdateMemberLvResult, temitem.Build());
            }

            //更新
        }
Exemplo n.º 11
0
        private void AddArea_ButtonClick(object sender, EventArgs e)
        {
            string areaName = "";

            using (MessageForm form = new MessageForm(""))
            {
                if (form.ShowDialog() == DialogResult.OK)
                {
                    areaName = form.InputText;
                }
            }
            if (areaName.Equals(""))
            {
                return;
            }
            StructDictItem.Builder item = new StructDictItem.Builder();
            item.Code = 0;
            item.Id   = 0;
            item.AddItem(areaName);
            SystemManageNetOperation.AddArea(AddAreaResult, item.Build());
        }