Пример #1
0
        //新增
        private void Add(object sender, EventArgs e)
        {
            model       = new RDRecord();
            model.dDate = DateTime.Now.Date;
            opState     = OpState.Add;

            this.RefreshUI();
        }
Пример #2
0
 //取消
 private void Cancel(object sender, EventArgs e)
 {
     this.opState = OpState.Browse;
     this.model   = Controller.Get(guid);
     if (model == null)
     {
         model = new RDRecord();
     }
     this.RefreshUI();
 }
Пример #3
0
 //弃审
 private void UnAudit(object sender, EventArgs e)
 {
     if (Controller.UnAudit(guid))
     {
         model = Controller.Get(guid);
         RefreshUI();
     }
     else
     {
         MsgBox.ShowInfoMsg("弃审失败!");
     }
 }
Пример #4
0
        private void FmLoad(object sender, EventArgs e)
        {
            this.Text = pnlMain.Text;
            this.InitGridView();

            if (opState == OpState.Add)
            {
                model       = model == null ? new RDRecord() : model;
                model.dDate = DateTime.Now.Date;
            }

            this.RefreshUI();
        }
Пример #5
0
        private void StockIn(object obj, EventArgs e)
        {
            #region 生成入库单

            RDRecord model = Controller.GetRDModel(this.DGX);

            FmRecord01 frm = new FmRecord01(model);
            FmMain.NewPageDelegate(frm);

            //FmQmPuIn frm = new FmQmPuIn();
            //if (frm.ShowDialog() == DialogResult.OK)
            //{
            //    //生成U8采购入库
            //    vouchId = new U8OperationClient().PuStoreInAdd(guid, frm.cWhCode, Information.UserInfo.cUser_Name);
            //}
            #endregion
        }
Пример #6
0
        //保存
        private void Save(object sender, EventArgs e)
        {
            SaveCheck();

            if (this.opState == OpState.Add)
            {
                this.guid = Controller.Add(model);
            }
            else if (this.opState == OpState.Update)
            {
                model.cModifier = Information.UserInfo.cUser_Name;
                Controller.Update(model);
            }
            model        = Controller.Get(guid);
            this.opState = OpState.Browse;
            RefreshUI();
        }
Пример #7
0
        //审核
        private void Audit(object obj, EventArgs e)
        {
            string vouchId = null;

            //生成U8采购入库
            vouchId = new U8OperationClient().PuStoreInAdd2(guid, Information.UserInfo.cUser_Name);


            if (Controller.Audit(guid, Information.UserInfo.cUser_Name, vouchId))
            {
                model = Controller.Get(guid);

                RefreshUI();

                MsgBox.ShowInfoMsg("生成采购入库单到U8成功: 单据ID: " + vouchId);
            }
            else
            {
                MsgBox.ShowInfoMsg("审核失败!");
            }
        }
Пример #8
0
 public FmRecord01(RDRecord model) : this()
 {
     this.opState = OpState.Add;
     this.model   = model;
 }
Пример #9
0
 //删除
 private void Delete(object sender, EventArgs e)
 {
     this.Controller.Delete(guid);
     this.model = new RDRecord();
     this.RefreshUI();
 }