Exemplo n.º 1
0
        //新增
        private void Add(object sender, EventArgs e)
        {
            model       = new QmRecord();
            model.dDate = DateTime.Now.Date;
            opState     = OpState.Add;

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

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

            this.RefreshUI();
        }
Exemplo n.º 5
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();
        }
Exemplo n.º 6
0
        //审核
        private void Audit(object obj, EventArgs e)
        {
            //try
            //{
            //    Controller.U8PuStoreIn(this.model);
            //}
            //catch (Exception ex)
            //{
            //    MsgBox.ShowInfoMsg("生成U8采购入库单出错: " + ex.Message);
            //    return;
            //}

            if (Controller.Audit(guid, Information.UserInfo.cUser_Name))
            {
                model = Controller.Get(guid);
                RefreshUI();
            }
            else
            {
                MsgBox.ShowInfoMsg("审核失败!");
            }
        }
Exemplo n.º 7
0
 public FmQmRecord(QmRecord model) : this()
 {
     this.opState = OpState.Add;
     this.model   = model;
 }
Exemplo n.º 8
0
 //删除
 private void Delete(object sender, EventArgs e)
 {
     this.Controller.Delete(guid);
     this.model = new QmRecord();
     this.RefreshUI();
 }