예제 #1
0
        public void UpdateMethodOK()
        {
            //create an instance of the class we want to create
            clsDepartmentCollection AllDepartments = new clsDepartmentCollection();
            //create the item of test data
            clsDepartment TestDepartment = new clsDepartment();
            //var to store the primary key
            Int32 PrimaryKey = 0;

            //set its properties
            TestDepartment.Dep_Name     = "Store";
            TestDepartment.Dep_Location = "Liverpool";
            TestDepartment.No_Employees = 44;
            //set ThisAddress to the test data
            AllDepartments.ThisDepartment = TestDepartment;
            //add the record
            PrimaryKey = AllDepartments.Add();
            //set the primary key of the test data
            TestDepartment.Dep_ID = PrimaryKey;
            //modify the test data
            TestDepartment.Dep_Name     = "Stores";
            TestDepartment.Dep_Location = "Liverpool";
            TestDepartment.No_Employees = 45;
            //set the record based on the new test data
            AllDepartments.ThisDepartment = TestDepartment;
            //update the record
            AllDepartments.Update();
            //find the record
            AllDepartments.ThisDepartment.Find(PrimaryKey);
            //test to see ThisAddress matches the test data
            Assert.AreEqual(AllDepartments.ThisDepartment, TestDepartment);
        }
예제 #2
0
        public clsDepartment m_objGetPatientLastFromDept(clsPatient p_objPatient)
        {
            string strXML  = "";
            int    intRows = 0;

            clsPICUShiftOutService m_objServ =
                (clsPICUShiftOutService)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(clsPICUShiftOutService));

            long lngRes = 0;

            try
            {
                lngRes = m_objServ.m_lngGetPatientLastFromDept(clsLoginContext.s_ObjLoginContext.m_ObjPrincial, p_objPatient.m_StrInPatientID, p_objPatient.m_ObjInBedInfo.m_ObjLastSessionInfo.m_DtmInDate.ToString("yyyy-MM-dd HH:mm:ss"), ref strXML, ref intRows);
            }
            finally
            {
                //m_objServ.Dispose();
            }
            if (lngRes > 0 && intRows > 0)
            {
                XmlDocument xmlDoc = new XmlDocument();
                xmlDoc.LoadXml(strXML);

                clsDepartment objDept = new clsDepartment();
                objDept.m_StrDeptID = xmlDoc.DocumentElement.FirstChild.Attributes[0].Value;

                return(objDept);
            }
            return(null);
        }
예제 #3
0
        public void DeleteMethodOK()
        {
            //create an instance of the class we want to create
            clsDepartmentCollection AllDepartments = new clsDepartmentCollection();
            //create the item of test data
            clsDepartment TestDepartment = new clsDepartment();
            //var to store the primary key
            Int32 PrimaryKey = 20;

            //set its properties
            TestDepartment.Dep_Name     = "Store";
            TestDepartment.Dep_Location = "Liverpool";
            TestDepartment.No_Employees = 44;
            //set ThisAddress to the test data
            AllDepartments.ThisDepartment = TestDepartment;
            //add the record
            PrimaryKey = AllDepartments.Add();
            //set the primary key of the test data
            TestDepartment.Dep_ID = PrimaryKey;
            //find the record
            AllDepartments.ThisDepartment.Find(PrimaryKey);
            //delete the record
            AllDepartments.Delete();
            //now find the record
            Boolean Found = AllDepartments.ThisDepartment.Find(PrimaryKey);

            //test to see that the record was not found
            Assert.IsFalse(Found);
        }
예제 #4
0
        public List <clsDepartment> ListDepartament_v1(ref BaseEntity Entity)
        {
            SqlCommand           cmd    = null;
            SqlDataReader        dr     = null;
            List <clsDepartment> lstobj = null;

            try
            {
                cmd             = new SqlCommand("sp_xP_Listar_Departamentos", clsConnection.GetConnection());
                cmd.CommandType = CommandType.StoredProcedure;
                dr = cmd.ExecuteReader();
                if (dr.HasRows)
                {
                    lstobj = new List <clsDepartment>();
                    while (dr.Read())
                    {
                        clsDepartment obj = new clsDepartment();
                        obj.ID          = dr.GetColumnValue <Int32>("ID");
                        obj.Description = dr.GetColumnValue <String>("DESCRIPCION");

                        lstobj.Add(obj);
                    }
                }
            }
            catch (Exception ex)
            {
                lstobj = null;
                Entity.Errors.Add(new BaseEntity.ListError(ex, "Recursos No Encontrados"));
            }
            finally
            {
                clsConnection.DisposeCommand(cmd);
            }
            return(lstobj);
        }
예제 #5
0
        public void InstanceOK()
        {
            //create an instance of the class
            clsDepartment AnDepartment = new clsDepartment();

            //test to see if it exists
            Assert.IsNotNull(AnDepartment);
        }
예제 #6
0
    public clsMessage UpdateDepartment(clsDepartment dept, string action = "Insert")
    {
        clsMessage rm = new clsMessage();

        rm = dept.updateDepartment(action);

        return(rm);
    }
        public ActionResult CreateRegForm()
        {
            clsDepartment     obj     = new clsDepartment();
            List <clsUserReg> lstUser = new List <clsUserReg>();



            ViewBag.Department = obj.GetDept();
            Session["Dpt"]     = ViewBag.Department;
            return(View());
        }
예제 #8
0
        public void ValidMethodOK()
        {
            //create an instance of the class
            clsDepartment AnDepartment = new clsDepartment();
            //string variable to store any error message
            String Error = "";

            //invoke the method
            Error = AnDepartment.Valid(Dep_Name, Dep_Location, No_Employees);
            //test to see that the result is correct
            Assert.AreEqual(Error, "");
        }
예제 #9
0
        /// <summary>
        /// 根据员工所在部门,生成对应的infAdjustMethod实例
        /// </summary>
        /// <param name="p_objDept">员工所在部门</param>
        public clsAdjustByDept(clsDepartment p_objDept)
        {
            switch (p_objDept.m_StrDeptID)
            {
            case "1110000":
                m_objAdjustMethod = new clsEBHKAdjustMethod();
                break;

            case "1560000":
                m_objAdjustMethod = new clsICUAdjustMethod();
                break;
            }
        }
예제 #10
0
        public void FindMethodOK()
        {
            //creates an instance
            clsDepartment AnDepartment = new clsDepartment();
            //boolean variable to store the result
            Boolean Found = false;
            //test data
            int Dep_ID = 1;

            //invoke the method
            Found = AnDepartment.Find(Dep_ID);
            //test to see that the result is correct
            Assert.IsTrue(Found);
        }
예제 #11
0
        public void NumberOfEmployeesMid()
        {
            //create an instance of the class we want to create
            clsDepartment AnDepartment = new clsDepartment();
            //string variable to store any error message
            String Error = "";
            //create some test data to pass to the method
            int No_Employees = 100; //this should be ok

            //invoke the method
            Error = AnDepartment.Valid(Dep_Name, Dep_Location, Convert.ToString(No_Employees));
            //test to see that the result is correct
            Assert.AreEqual(Error, "");
        }
예제 #12
0
        public void NumberOfEmployeesIncorrectFormat()
        {
            //create an instance of the class we want to create
            clsDepartment AnDepartment = new clsDepartment();
            //string variable to store any error message
            String Error = "";
            //create some test data to pass to the method
            String No_Employees = "two";

            //invoke the method
            Error = AnDepartment.Valid(Dep_Name, Dep_Location, No_Employees);
            //test to see that the result is correct
            Assert.AreNotEqual(Error, "");
        }
예제 #13
0
        public void DepartmentLocationMaxPlusOne()
        {
            //create an instance of the class we want to create
            clsDepartment AnDepartment = new clsDepartment();
            //string variable to store any error message
            String Error = "";
            //create some test data to pass to the method
            string Dep_Location = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; //this should fail

            //invoke the method
            Error = AnDepartment.Valid(Dep_Name, Dep_Location, No_Employees);
            //test to see that the result is correct
            Assert.AreNotEqual(Error, "");
        }
예제 #14
0
    protected void btnFind_Click(object sender, EventArgs e)
    {
        clsDepartment ADepartment = new clsDepartment();
        Int32         dep_ID;
        Boolean       Found = false;

        dep_ID = Convert.ToInt32(txtdep_ID.Text);
        Found  = ADepartment.Find(dep_ID);

        if (Found == true)
        {
            txtdep_Location.Text = ADepartment.Dep_Location;
            txtdep_Name.Text     = ADepartment.Dep_Name;
            txtno_Employee.Text  = ADepartment.No_Employees.ToString();
        }
    }
예제 #15
0
        public void ThisDepartmentPropertyOK()
        {
            //create an instance of the class we want to create
            clsDepartmentCollection AllDepartments = new clsDepartmentCollection();
            //create some test data to assign to the property
            clsDepartment TestDepartment = new clsDepartment();

            //set the properties of the test object
            TestDepartment.Dep_ID       = 6;
            TestDepartment.Dep_Name     = "Media";
            TestDepartment.Dep_Location = "Suffolk";
            TestDepartment.No_Employees = 23;
            //assign the data to the property
            AllDepartments.ThisDepartment = TestDepartment;
            //test to see that the two values are the same
            Assert.AreEqual(AllDepartments.ThisDepartment, TestDepartment);
        }
예제 #16
0
        public void Dep_Location_PropertyOK()

        {
            //an instance of the class

            clsDepartment AnDepartment = new clsDepartment();

            //test data

            String TestData = "Test Maker";

            //assigning data

            AnDepartment.Dep_Location = TestData;

            //test

            Assert.AreEqual(AnDepartment.Dep_Location, TestData);
        }
예제 #17
0
        public void Dep_Name_PropertyOK()

        {
            //an instance of the class

            clsDepartment AnDepartment = new clsDepartment();

            //test data

            String TestData = "John Smith";

            //assigning data

            AnDepartment.Dep_Name = TestData;

            //test

            Assert.AreEqual(AnDepartment.Dep_Name, TestData);
        }
예제 #18
0
        public void No_Employees_PropertyOK()

        {
            //an instance of the class

            clsDepartment AnDepartment = new clsDepartment();

            //test data

            int TestData = 100;

            //assigning data

            AnDepartment.No_Employees = TestData;

            //test

            Assert.AreEqual(AnDepartment.No_Employees, TestData);
        }
예제 #19
0
        /// <summary>
        /// 获得该病区下的病床及病人
        /// </summary>
        /// <param name="p_strDeptID">科室ID</param>
        /// <param name="p_strAreaID">病区ID</param>
        /// <returns></returns>
//		public long lngGetCurrentBedArr(string p_strDeptID,string p_strAreaID,out clsBedInfo[] p_objBedArr )
//		{
//			p_objBedArr= new clsBedInfo[5];
//			for(int i=0;i<5;i++)
//			{
//				p_objBedArr[i]= new clsBedInfo();
//				p_objBedArr[i].m_strBedID=i.ToString("0000000");
//				p_objBedArr[i].m_strBedName="Bed Name";
//				p_objBedArr[i].m_strBedInPatientID=(i*2).ToString("0000000");
//				p_objBedArr[i].m_strBedInPatientName="Patient Name";
////				p_objBedArr[i].m_strBedInPatientDate="1900-1-1";
//			}
//			p_objBedArr[2].m_strBedInPatientID="";
//			p_objBedArr[0].m_strBedInPatientID=null;
//
//			return 1;
//		}
        /// <summary>
        /// 根据员工ID获取所属科室列表
        /// </summary>
        /// <param name="p_strEmployeeID">员工ID</param>
        /// <param name="p_objResultArr">科室数组</param>
        /// <returns></returns>
        public long m_lngGetDeptInfo(string p_strEmployeeID, out clsEmrDept_VO[] p_objNewDeptArr, out clsDepartment[] p_objOldDeptArr)
        {
            p_objNewDeptArr = null;
            p_objOldDeptArr = null;
            long lngRes = 0;
            clsHospitalManagerService objSvc =
                (clsHospitalManagerService)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(clsHospitalManagerService));

            try
            {
                DataTable dtbResult = new DataTable();
                lngRes = objSvc.m_lngGetDeptInfo(null, p_strEmployeeID, out dtbResult);
                if (lngRes > 0 && dtbResult.Rows.Count > 0)
                {
                    p_objNewDeptArr = new clsEmrDept_VO[dtbResult.Rows.Count];
                    p_objOldDeptArr = new clsDepartment[dtbResult.Rows.Count];
                    for (int i1 = 0; i1 < dtbResult.Rows.Count; i1++)
                    {
                        p_objNewDeptArr[i1] = new clsEmrDept_VO();
                        p_objNewDeptArr[i1].m_strDEPTID_CHR    = dtbResult.Rows[i1]["DEPTID_CHR"].ToString().Trim();
                        p_objNewDeptArr[i1].m_strDEPTNAME_VCHR = dtbResult.Rows[i1]["DEPTNAME_VCHR"].ToString();
                        p_objNewDeptArr[i1].m_strADDRESS_VCHR  = dtbResult.Rows[i1]["ADDRESS_VCHR"].ToString();
                        p_objNewDeptArr[i1].m_strSHORTNO_CHR   = dtbResult.Rows[i1]["SHORTNO_CHR"].ToString();
                        if (p_objNewDeptArr[i1].m_strSHORTNO_CHR != null)
                        {
                            p_objNewDeptArr[i1].m_strSHORTNO_CHR = p_objNewDeptArr[i1].m_strSHORTNO_CHR.Trim();
                        }
                        p_objNewDeptArr[i1].m_intDEFAULT_INPATIENT_DEPT_INT = Convert.ToInt32(dtbResult.Rows[i1]["DEFAULT_INPATIENT_DEPT_INT"]);
                        p_objOldDeptArr[i1] = new clsDepartment(p_objNewDeptArr[i1].m_strDEPTID_CHR, p_objNewDeptArr[i1].m_strSHORTNO_CHR, p_objNewDeptArr[i1].m_strDEPTNAME_VCHR, p_objNewDeptArr[i1].m_strADDRESS_VCHR);
                    }
                }
            }
            catch (Exception exp)
            {
                com.digitalwave.Utility.clsLogText objLogger = new com.digitalwave.Utility.clsLogText();
                bool blnRes = objLogger.LogError(exp);
            }
            finally
            {
                // objSvc.Dispose();
            }
            return(lngRes);
        }
예제 #20
0
        public void Dep_ID_PropertyOK()

        {
            //an instance of the class

            clsDepartment AnDepartment = new clsDepartment();

            //test data

            int TestData = 1;

            //assigning data

            AnDepartment.Dep_ID = TestData;

            //test

            Assert.AreEqual(AnDepartment.Dep_ID, TestData);
        }
        private List <SelectListItem> GetDepartment()
        {
            //to Get all deprment
            clsDepartment        objclsDepartment = new clsDepartment();
            List <clsDepartment> lstDept          = objclsDepartment.GetDept();

            List <SelectListItem> itemslst = new List <SelectListItem>();

            foreach (clsDepartment obj in lstDept)
            {
                SelectListItem item = new SelectListItem();
                item.Value = Convert.ToString(obj.DeptID);
                item.Text  = obj.DeptName;
                //  adding object to list
                itemslst.Add(item);
            }

            return(itemslst);
        }
예제 #22
0
        public void TestNoEmployeesFound()
        {
            //create an instance
            clsDepartment AnDepartment = new clsDepartment();
            //bool variable to store the result of the search
            Boolean Found = false;
            //bool variable to record if the data is OK
            Boolean OK = true;
            //test data
            int Dep_ID = 1;

            //invoke the method
            Found = AnDepartment.Find(Dep_ID);
            //check the Department ID
            if (AnDepartment.No_Employees != 11)
            {
                OK = false;
            }
            //test to see that the result is correct
            Assert.IsTrue(OK);
        }
예제 #23
0
    protected void btnOK_Click(object sender, EventArgs e)
    {
        clsDepartment ADepartment = new clsDepartment();


        string dep_Location = txtdep_Location.Text;
        string dep_Name     = txtdep_Name.Text;
        string no_Employees = txtno_Employee.Text;
        string Error        = "";

        Error = ADepartment.Valid(dep_Name, dep_Location, no_Employees);
        if (Error == "")
        {
            ADepartment.Dep_ID       = dep_ID;
            ADepartment.Dep_Name     = dep_Name;
            ADepartment.Dep_Location = dep_Location;
            ADepartment.No_Employees = Convert.ToInt32(no_Employees);

            clsDepartmentCollection DepartmentList = new clsDepartmentCollection();

            if (Convert.ToInt32(dep_ID) == -1)
            {
                DepartmentList.ThisDepartment = ADepartment;
                DepartmentList.Add();
            }
            else
            {
                DepartmentList.ThisDepartment.Find(Convert.ToInt32(dep_ID));
                DepartmentList.ThisDepartment = ADepartment;
                DepartmentList.Update();
            }
            Response.Redirect("DefaultDepartment.aspx");
        }
        else
        {
            lblError.Text = Error;
        }
    }
예제 #24
0
        public void AddMethodOK()
        {
            //create an instance of the class we want to create
            clsDepartmentCollection AllDepartments = new clsDepartmentCollection();;
            //create the item of test data
            clsDepartment TestDepartment = new clsDepartment();
            //var to store the primary key
            Int32 PrimaryKey = 12;

            //set its properties
            TestDepartment.Dep_Name     = "Store";
            TestDepartment.Dep_Location = "Liverpool";
            TestDepartment.No_Employees = 44;
            //set ThisEmployee to the test data
            AllDepartments.ThisDepartment = TestDepartment;
            //add the record
            AllDepartments.Add();
            //set the primary key of the test data
            //find the record
            AllDepartments.ThisDepartment.Find(PrimaryKey);
            //test to see that the two values are the same
            Assert.AreEqual(AllDepartments.ThisDepartment, TestDepartment);
        }
예제 #25
0
        public void ListAndCountOK()
        {
            //create an instance of the class we want to create
            clsDepartmentCollection AllDepartments = new clsDepartmentCollection();
            //create some test data to assign to the property
            //in this case the data needs to be a list of objects
            List <clsDepartment> TestList = new List <clsDepartment>();
            //add an item to the list
            //create the item of test data
            clsDepartment TestDepartment = new clsDepartment();

            //set its properties
            TestDepartment.Dep_ID       = 7;
            TestDepartment.Dep_Name     = "Store";
            TestDepartment.Dep_Location = "Liverpool";
            TestDepartment.No_Employees = 44;
            //add the item to the test list
            TestList.Add(TestDepartment);
            //assign the data to the property
            AllDepartments.DepartmentList = TestList;
            //test to see that the two values are the same
            Assert.AreEqual(AllDepartments.Count, TestList.Count);
        }
예제 #26
0
        protected override void m_mthSetBaseDept(clsPICUShiftInfo p_objShiftInfo)
        {
            //m_cboToDept.Text = p_objShiftInfo.m_objTurnInfo.m_strTurnToDeptName;
            //if (m_ObjCurrentArea != null)
            clsPatient objPatient = m_objBaseCurrentPatient;

            if (objPatient == null)
            {
                m_lblTurnBaseDeptName.Text = "";
            }
            else
            {
                clsDepartment objFromDept = m_objShiftOutDomain.m_objGetPatientLastFromDept(objPatient);
                if (objFromDept == null)
                {
                    m_lblTurnBaseDeptName.Text = "";
                }
                else
                {
                    m_lblTurnBaseDeptName.Text = objFromDept.m_StrDeptID;
                }
            }
        }
예제 #27
0
    public List <clsDepartment> GetDepartment(string departmentID)
    {
        clsMessage           ec       = new clsMessage();
        clsDepartment        dClass   = new clsDepartment();
        List <clsDepartment> deptList = new List <clsDepartment>();

        try
        {
            int  id = 0;
            bool b  = int.TryParse(departmentID, out id);


            dClass.DepartmentID = id;

            deptList = dClass.getDepartments();
        }
        catch (Exception er)
        {
            deptList.Add(new clsDepartment {
                ErrorMessage = er.Message.ToString()
            });
        }
        return(deptList);
    }
예제 #28
0
        /// <summary>
        /// 获取员工所属科室
        /// </summary>
        /// <param name="p_strEmployeeID"></param>
        /// <returns></returns>
        public clsDepartment[] m_objGetEmpDept(string p_strEmployeeID)
        {
            if (p_strEmployeeID == null || p_strEmployeeID == string.Empty)
            {
                return(null);
            }
            clsDept_Desc[] objDeptDescArr;
            long           lngres = new clsDepartmentManager().m_lngGetDeptArr_EmployeeCanManage(clsLoginContext.s_ObjLoginContext.m_ObjPrincial, p_strEmployeeID, out objDeptDescArr);

            if (lngres <= 0 || objDeptDescArr == null)
            {
                return(null);
            }
            clsDepartment[] objDeptArr = new clsDepartment[objDeptDescArr.Length];
            for (int i = 0; i < objDeptDescArr.Length; i++)
            {
                objDeptArr[i] = new clsDepartment(objDeptDescArr[i].m_strDeptID, objDeptDescArr[i].m_strDeptName);
            }
            if (objDeptArr.Length > 0)
            {
                return(objDeptArr);
            }
            return(null);
        }
        protected override void m_mthSetPatientBaseInfo(clsPatient p_objSelectedPatient)
        {
            if (p_objSelectedPatient.m_ObjPeopleInfo == null)
            {
                m_mthShowNoPatient();
                return;
            }
            //这个开关的作用是以防对m_cboArea赋值后触发其SelectedIndexChanged事件
            m_blnCanTextChanged = false;

            if (p_objSelectedPatient.m_ObjInBedInfo.m_ObjLastSessionInfo != null)
            {
                //				m_cboDept.ClearItem();
                //				m_cboArea.ClearItem();
                //				m_cboDept.AddItem(p_objSelectedPatient.m_ObjInBedInfo.m_ObjLastDeptInfo.m_ObjDept);
                //				m_cboDept.SelectedIndex=0;
                //				clsInPatientArea objInPatientArea =new clsInPatientArea(p_objSelectedPatient.m_ObjInBedInfo.m_ObjLastAreaInfo.m_ObjArea.m_StrAreaID,p_objSelectedPatient.m_ObjInBedInfo.m_ObjLastAreaInfo.m_ObjArea.m_StrAreaName);
                //				m_cboArea.AddItem(objInPatientArea);
                //				m_cboArea.SelectedIndex=0;
                //				m_txtBedNO.Text = p_objSelectedPatient.m_ObjInBedInfo.m_ObjLastBedInfo.m_ObjBed.m_StrBedName;
                //使用新表 modified by tfzhang at 2005年10月17日 16:02:29
                //清空
                m_cboDept.ClearItem();

                //获取科室
                string str1 = p_objSelectedPatient.m_strDeptNewID;
                string str2;
                clsHospitalManagerDomain objDomain = new clsHospitalManagerDomain();
                clsEmrDept_VO            objDeptNew;
                objDomain.m_lngGetSpecialDeptInfo(str1, out objDeptNew);
                str1 = objDeptNew.m_strSHORTNO_CHR.Trim();
                str2 = objDeptNew.m_strDEPTNAME_VCHR.Trim();
                string        str11       = objDeptNew.m_strDEPTID_CHR.Trim();
                clsDepartment objDeptTemp = new clsDepartment(str1, str2);
                //转换使用,新表的shortno=旧表的ID,所以新加一个字段保存新表ID
                objDeptTemp.m_strDeptNewID = str11;
                m_cboDept.AddItem(objDeptTemp);
                m_cboDept.SelectedIndex = 0;

                //获取病区
                m_cboArea.ClearItem();
                string str3 = p_objSelectedPatient.m_strAreaNewID;
                if (str3.Trim().Length != 0)//病区不为空
                {
                    string        str4;
                    clsEmrDept_VO objAreNew;
                    objDomain.m_lngGetSpecialAreaInfo(str3, out objAreNew);
                    str3 = objAreNew.m_strSHORTNO_CHR;
                    str4 = objAreNew.m_strDEPTNAME_VCHR;
                    clsInPatientArea objInPatientArea = new clsInPatientArea(str3, str4, str3);
                    //转换使用,新表的shortno=旧表的ID,所以新加一个字段保存新表ID
                    objInPatientArea.m_strAreaNewID = objAreNew.m_strDEPTID_CHR;
                    m_cboArea.AddItem(objInPatientArea);
                    m_cboArea.SelectedIndex = 0;
                }

                m_txtBedNO.Text = p_objSelectedPatient.m_strBedCode;
            }
            else
            {
                m_txtBedNO.Text = "";
            }

            m_objCurrentPatient = p_objSelectedPatient;

            txtInPatientID.Text   = m_objCurrentPatient.m_StrHISInPatientID;
            m_txtPatientName.Text = m_objCurrentPatient.m_ObjPeopleInfo.m_StrFirstName;
            lblSex.Text           = m_objCurrentPatient.m_ObjPeopleInfo.m_StrSex;
            lblAge.Text           = m_objCurrentPatient.m_ObjPeopleInfo.m_StrAge;
            m_blnCanTextChanged   = true;
        }
예제 #30
0
        /// <summary>
        /// 登录员工的权限信息
        /// </summary>
//		private clsPrivilegeInfo[] objPIArr = clsLoginContext.s_ObjLoginContext.m_ObjPIArr;

        public frmPatientLabel()
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            this.StartPosition = FormStartPosition.CenterParent;
            try
            {
//				m_blnCanDeptSelectIndexChangeEventTakePlace=false;
                //初始化清空
                m_cboDept.ClearItem();
                this.m_cboArea.ClearItem();
                this.m_cboArea.Text = "";
                //获取科室
                clsHospitalManagerDomain objDomain      = new clsHospitalManagerDomain();
                clsEmrDept_VO[]          objDeptInfoArr = null;
                long lngRes = objDomain.m_lngGetDeptInfo(clsEMRLogin.LoginInfo.m_strEmpID, out objDeptInfoArr);
                if (lngRes <= 0)
                {
                    if (lngRes == (long)iCareData.enmOperationResult.Not_permission)
                    {
                        clsPublicFunction.ShowInformationMessageBox("权限不足!");
                    }
                    else
                    {
                        clsPublicFunction.ShowInformationMessageBox("数据库连接失败!");
                    }
                    return;
                }
                if (objDeptInfoArr != null)
                {
                    for (int i = 0; i < objDeptInfoArr.Length; i++)
                    {
                        //转换为旧的
                        clsDepartment objDeptTemp = new clsDepartment(objDeptInfoArr[i].m_strSHORTNO_CHR, objDeptInfoArr[i].m_strDEPTNAME_VCHR);
                        //转换使用,新表的shortno=旧表的ID,所以新加一个字段保存新表ID
                        objDeptTemp.m_strDeptNewID = objDeptInfoArr[i].m_strDEPTID_CHR;
                        m_cboDept.AddItem(objDeptTemp);
                        //m_cboDept.AddItem(objDeptInfoArr[i]);
                    }
                }
            }
            catch (Exception exp)
            {
                string strErrMessage = exp.Message + "\n at Module:[" + exp.TargetSite.ReflectedType.Name + "]\n  Method:[" + exp.TargetSite.Name + "]";
                com.digitalwave.Utility.clsLogText objLogger = new com.digitalwave.Utility.clsLogText();
                objLogger.Log2File(MDIParent.s_strErrorFilePath, "Exception: \r\n" + strErrMessage);
                MessageBox.Show(strErrMessage, "Error Message", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            #region mark by bhuang
            //添加部门
//			clsDepartment[] objDeptArr;
//
//			objDeptArr=	m_objDepartmentManager.m_objGetAllInDeptArr();
//
//			if(objDeptArr !=null)
//			{
//				string strDeptID = "";
//				for(int i=0;i<objDeptArr.Length;i++)
//				{
//					if(objPIArr != null)
//					{
//						for(int i1=0;i1<objPIArr.Length;i1++)
//						{
//							if(objPIArr[i1] == null)
//								continue;
//
//							if((objPIArr[i1].m_objGetOISF(objDeptArr[i].m_StrDeptID,(int)PrivilegeData.enmPrivilegeSF.HRPExplorer,(int)PrivilegeData.enmPrivilegeOperation.Read) != null) && strDeptID!=objDeptArr[i].m_StrDeptID)
//							{
//								m_cboDept.AddItem(objDeptArr[i]);
//								strDeptID = objDeptArr[i].m_StrDeptID;
//							}
//						}
//					}
//				}
//				m_cboDept.SelectedIndex = 0;
//			}
            #endregion
        }