Beispiel #1
0
        //注册事件的方法
        public void SetTxt(object sender, EventArgs e)
        {
            LoadCategoryInfoByDelFlag(0);
            FrmEventArgs fea = e as FrmEventArgs;

            this.TP = fea.Temp;
            if (this.TP == 3)//新增
            {
            }
            else if (this.TP == 4)                        //修改
            {
                ProductInfo pro = fea.obj as ProductInfo; //小坑
                txtCost.Text   = pro.ProCost.ToString();
                txtName.Text   = pro.ProName;             //名字
                txtNum.Text    = pro.ProNum;              //编号
                txtPrice.Text  = pro.ProPrice.ToString(); //价格
                txtRemark.Text = pro.Remark;              //备注
                txtSpell.Text  = pro.ProSpell;            //坑-===天坑--拼音
                txtStock.Text  = pro.ProStock.ToString();
                txtUnit.Text   = pro.ProUnit;
                //id
                labId.Text = pro.ProId.ToString();

                cmbCategory.SelectedValue = pro.CatId;//显示该产品对应的类别
            }
        }
Beispiel #2
0
        public void SetTxt(object sender, EventArgs e)
        {
            LoadMemmberTypeByDelFlag(0);
            //获取传过来的标识和对象
            FrmEventArgs fea = e as FrmEventArgs;

            this.TP = fea.Temp;
            if (this.TP == 1)
            {
            }
            else if (this.TP == 2)                      //修改
            {
                MemberInfo mem = fea.obj as MemberInfo; //获取会员对象
                txtMemNum.Text      = mem.MemberNum;
                txtBirs.Text        = mem.MemberBirthday.ToString();
                txtMemDiscount.Text = mem.MemberDiscount.ToString();
                txtMemIntegral.Text = mem.MemberIntegral.ToString();
                txtmemMoney.Text    = mem.MemberMoney.ToString();
                txtMemName.Text     = mem.MemberName;
                txtMemPhone.Text    = mem.MemberMobilePhone;
                rdoMan.Checked      = mem.MemberGender == "男" ? true : false;
                rdoWomen.Checked    = mem.MemberGender == "女" ? true:false;
                labId.Text          = mem.MemberId.ToString();

                cmbMemType.SelectedValue = mem.MemType;//设置显示的会员等级,通过Memtype的值
                dtEndServerTime.Value    = mem.MemberEndServerTime;
            }
        }
Beispiel #3
0
        private  int TP { get; set; }//标识

        public void SetTxt(object sender,EventArgs e)
        {
            FrmEventArgs fea = e as FrmEventArgs;
            this.TP = fea.Temp;
            if (this.TP==1)//新增
            {

            }
            else if (this.TP==2)
            {
                CategoryInfo ct = fea.obj as CategoryInfo;
                txtCName.Text = ct.CatName;
                txtCNum.Text = ct.CatNum;
                txtCRemark.Text = ct.Remark;
                labId.Text = ct.CatId.ToString();

            }

        }