Esempio n. 1
0
        /// <summary>
        /// 修改批次对应的冲药
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void View_OnUpdateBatchSet(object sender, Views.DataManage.EditBatchToRedDrugEventArgs e)
        {
            bool IsUpdate = this.Model.UpdateBatchSet(e.BatchTime, e.Time_id, e.User_id, e.Batch_id);

            if (IsUpdate)
            {
                //this.View.ShowMessage("修改成功");
                this.View.CloseWindow();
            }
            else
            {
                this.View.ShowMessage("修改失败");
            }
        }
Esempio n. 2
0
        private void EditBatchToDrug()
        {
            bool isSelect = false; //表示是否选中了冲药

            if (CJia.PIVAS.Tools.Message.ShowQuery("是否确认修改", CJia.PIVAS.Tools.Message.Button.YesNo) == CJia.PIVAS.Tools.Message.Result.Yes)
            {
                CJia.PIVAS.Views.DataManage.EditBatchToRedDrugEventArgs editbatch = new Views.DataManage.EditBatchToRedDrugEventArgs();
                for (int i = 0; i < ClcRedDrug.Items.Count; i++)
                {
                    if (ClcRedDrug.Items[i].CheckState == CheckState.Checked)
                    {
                        editbatch.Time_id = long.Parse(ClcRedDrug.Items[i].Value.ToString());
                        isSelect          = isSelect || true;
                    }
                }
                if (!isSelect)
                {
                    CJia.PIVAS.Tools.Message.Show("请选择批次!");
                    return;
                }
                editbatch.Batch_id  = BatchId;
                editbatch.BatchTime = TeBatchTime.Text;
                editbatch.User_id   = User.UserId;
                this.OnIsRepeat(null, editbatch);
                if (!IsRepeat)
                {
                    this.OnUpdateBatchSet(null, editbatch);
                    this.CloseWindow();
                }
                else
                {
                    CJia.PIVAS.Tools.Message.ShowWarning("修改的批次执行时间应该在前后两个批次之间");
                }
            }
            else
            {
                return;
            }
        }
Esempio n. 3
0
        //传回UI层告知修改是否有重复
        void View_OnIsRepeat(object sender, Views.DataManage.EditBatchToRedDrugEventArgs e)
        {
            bool IsRepeat = this.Model.IsRepeat(e.Batch_id, e.BatchTime);

            this.View.ExeIsRepeat(IsRepeat);
        }