Exemple #1
0
        void xapFormControl_FormCreated(object sender, EventArgs e)
        {
            XTabPage patPage = this.xapFormControl.GetTabPageByTabCode("patmsg");

            if (patPage != null)
            {
                //patPage.PageControl.Visible = false;
                this.patvView = new ConsPatDetailCardView()
                {
                    Dock = DockStyle.Fill
                };
                if (!this.patvView.Created)
                {
                    this.patvView.CreateControl();
                }
                patPage.PageControl = this.patvView;
                if (this.id_ent != null)
                {
                    this.patvView.model = this.model;
                    this.patvView.LoadData();
                }
            }
            this.gv_eview              = this.xapFormControl.GetGridView("review");
            this.gv_invite             = this.xapFormControl.GetGridView("consorg");
            this.btnEdit               = this.xapFormControl.GetUserRender("consap", "btn_edit");
            this.btSave                = this.xapFormControl.GetUserRender("consap", "btn_save");
            this.btnCancle             = this.xapFormControl.GetUserRender("consap", "btn_cancle");
            this.btnEdit.Visible       = false;
            this.btSave.Visible        = false;
            this.btnCancle.Visible     = false;
            this.btnEdit.MouseClick   += new MouseEventHandler(button_MouseClick);
            this.btSave.MouseClick    += new MouseEventHandler(button_MouseClick);
            this.btnCancle.MouseClick += new MouseEventHandler(button_MouseClick);
        }
Exemple #2
0
 protected override void OnLoadData()
 {
     if (model != null)
     {
         return;
     }
     model = new ConsCardViewModel();
 }
Exemple #3
0
 public ConsCardView()
 {
     InitializeComponent();
     this.xapFormControl.Load        += new EventHandler(ConsCardView_Load);
     this.xapFormControl.FormCreated += new EventHandler(xapFormControl_FormCreated);
     this.xapFormControl.ModelFilled += new EventHandler(xapFormControl_ModelFilled);
     this.xapFormControl.RefFilter   += new EventHandler <RefActivatingEventArgs>(OnRefFilter);
     xapFormControl.DataChanged      += new EventHandler <DataChangedEventArgs>(xapFormControl_DataChanged);
     if (model != null)
     {
         return;
     }
     model = new ConsCardViewModel();
 }
Exemple #4
0
 public override void OnSelected(object sender, TargetEventArgs e)
 {
     if ((e.Object is OrdConsDTO))
     {
         this.model.ConsDto  = e.Object as OrdConsDTO;
         this.patvView.model = this.model;
         if (this.patvView.Created)
         {
             this.patvView.LoadData();
             this.patvView.funid = this.funId;
         }
         this.model.GetConsApData(this.model.ConsDto.Id_apcons, this.type);
         this.LoadData();
         this.SetPolicy(false);
         //限制开始时间的时间范围,入院日期,最大提前日期
         if (this.model.ConsDto.Id_en != null)
         {
             TimerComboBoxMaxAndMin.GetInstance()
             .setMaxMinTime(xapFormControl, this.Context, "consap", "dt_plan",
                            this.model.ConsDto.Id_en);
         }
     }
 }
Exemple #5
0
        public override void HandleState(object sender, DictionaryEventArgs eventArgs)
        {
            string uiEvent = eventArgs.Data[UIConst.UI_EVENT] as string;

            //string newState = eventArgs.Data[UIConst.NEW_STATE] as string;
            switch (uiEvent)
            {
            case UIEvent.LOAD:
                Dictionary <string, object> dic = eventArgs.Data["Data"] as Dictionary <string, object>;
                string   str  = dic["BeanConfigFilePath"].ToString();
                string[] strs = str.Split('\\');
                string   xml  = strs[strs.Length - 1];
                switch (xml)
                {
                case CiDictCodeTypeConst.CICONS_RESPONSE:
                    this.type  = CiDictCodeConst.CONS_RESPONSE;
                    this.funId = CiDictCodeTypeConst.CICONS_RESPONSE_ID;
                    break;

                case CiDictCodeTypeConst.CICONS_REVIEW_ADM:
                    this.type  = CiDictCodeConst.CONS_MADREVIEW;
                    this.funId = CiDictCodeTypeConst.CICONS_REVIEW_ADM_ID;
                    break;

                case CiDictCodeTypeConst.CICONS_REVIEW_DEP:
                    this.type  = CiDictCodeConst.CONS_DEPREVIEW;
                    this.funId = CiDictCodeTypeConst.CICONS_REVIEW_DEP_ID;
                    break;

                case CiDictCodeTypeConst.CICONS_RESPONSE_DIAG:
                    this.funId  = CiDictCodeTypeConst.CICONS_RESPONSE_DIAG_ID;
                    this.id_ent = dic["Id_ent"].ToString();
                    this.model.GetConsByIdent(UserManager.getInstance().CurrentDept.Id_dep, id_ent);
                    if (this.patvView != null && this.patvView.Created)
                    {
                        this.patvView.model = this.model;
                        this.patvView.LoadData();
                    }

                    //this.LoadData();
                    break;

                default:
                    break;
                }
                break;

            case "AgreeSuccess":
                this.model.ConsDto = null;
                //if (patvView.ViewFile!=null)
                this.patvView.ClearForm();
                this.xapFormControl.ClearFormData();
                this.OnLoadData();
                break;

            case "Query":
                this.patvView.ClearForm();
                this.patvView.btnEmr.Enabled = false;
                this.xapFormControl.ClearFormData();
                this.btnEdit.Enabled   = false;
                this.btSave.Enabled    = false;
                this.btnCancle.Enabled = false;
                string[] str1 = { "dt_plan", "fg_urgent", "des_psp", "des_emr", "place" };
                this.ConsApContrlsEnable(str1, false);
                break;

            default:
                break;
            }
        }