public void ListandCountOK()
        {
            //create an instance of the class we want to create
            clsEmployeeCollection Employees = new clsEmployeeCollection();
            //create some test data to assign to the property
            //in this case the data will be a list of objects
            List <clsEmployee> TestList = new List <clsEmployee>();
            //add an item to the list
            //create the item of test data
            clsEmployee TestEmployee = new clsEmployee();

            //set its properties
            TestEmployee.Active     = true;
            TestEmployee.EmployeeNo = 4375;
            TestEmployee.FirstName  = "John";
            TestEmployee.LastName   = "Make";

            TestEmployee.Address      = " 11 donald Road";
            TestEmployee.DateJoined   = DateTime.Now.Date;
            TestEmployee.PostCode     = " KT6 8RJ";
            TestEmployee.EmailAddress = " [email protected]";
            TestEmployee.PostCode     = "07838774833";
            //add the item to the test list
            TestList.Add(TestEmployee);
            //assign the data to the property
            Employees.EmployeeList = TestList;
            //test to see that the two values are the same
            Assert.AreEqual(Employees.EmployeeList, TestList);
        }
Esempio n. 2
0
        /// <summary>
        /// 特殊记录内容格式Xml的获取
        /// </summary>
        /// <returns></returns>
        public override string m_strGetTrackXml()
        {
            if (m_objRecordContent == null)
            {
                return("");
            }

            clsDeadRecordContent objContent = ((clsDeadRecordContent)m_objRecordContent);
            string strText = m_strGetHeaderText();

            string      strCreateUserName = "";
            clsEmployee objEmployee       = new clsEmployee(m_objRecordContent.m_strCreateUserID);

            if (objEmployee != null)
            {
                strCreateUserName = objEmployee.m_StrLastName;
            }

            string strXML1 = ctlRichTextBox.clsXmlTool.s_strMakeTextXml(strText, objContent.m_strCreateUserID, strCreateUserName, System.Drawing.Color.White);
            string strXML2 = ctlRichTextBox.clsXmlTool.s_strMakeTextXml("\n死亡时间:" + objContent.m_dtmDeadDate.ToString("yyyy年MM月dd日HH时mm分"), objContent.m_strCreateUserID, strCreateUserName, System.Drawing.Color.White);
            string strXML3 = ctlRichTextBox.clsXmlTool.s_strMakeTextXml("\n入院情况:", objContent.m_strCreateUserID, strCreateUserName, System.Drawing.Color.White);
            string strXML4 = ctlRichTextBox.clsXmlTool.s_strMakeTextXml("\n初步诊断:", objContent.m_strCreateUserID, strCreateUserName, System.Drawing.Color.White);
            string strXML5 = ctlRichTextBox.clsXmlTool.s_strMakeTextXml("\n诊治经过:", objContent.m_strCreateUserID, strCreateUserName, System.Drawing.Color.White);
            string strXML6 = ctlRichTextBox.clsXmlTool.s_strMakeTextXml("\n死亡疾病诊断:", objContent.m_strCreateUserID, strCreateUserName, System.Drawing.Color.White);
            string strXML7 = ctlRichTextBox.clsXmlTool.s_strMakeTextXml("\n死亡原因:", objContent.m_strCreateUserID, strCreateUserName, System.Drawing.Color.White);
            string strXML8 = ctlRichTextBox.clsXmlTool.s_strMakeTextXml("\n经验教训:", objContent.m_strCreateUserID, strCreateUserName, System.Drawing.Color.White);

            string strXML = ctlRichTextBox.clsXmlTool.s_strCombineXml(new string[] { strXML1, strXML2, strXML3, objContent.m_strInHospitalCaseXML, strXML4, objContent.m_strOriginalDiagnoseXML, strXML5, objContent.m_strDiagnoseByXML, strXML6, objContent.m_strDeadDiagnoseXML, strXML7, objContent.m_strDeadReasonXML, strXML8, objContent.m_strExperienceXML });

            return(strXML);
        }
Esempio n. 3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     clsSpeedo.Authenticate();
     // btnSend.Attributes.Add("onclick", "if(Page_ClientValidate()){this.disabled=true;" + btnSend.Page.ClientScript.GetPostBackEventReference(btnSend, string.Empty).ToString() + ";return CheckIsRepeat();}");
     btnSend.Attributes.Add("onclick", " this.disabled = true; " + ClientScript.GetPostBackEventReference(btnSend, null) + ";");
     btnPrint.Attributes.Add("onclick", " this.disabled = true; " + ClientScript.GetPostBackEventReference(btnPrint, null) + ";");
     if (!Page.IsPostBack)
     {
         trNoRequest.Visible = true;
         MakeCart();
         LoadDDLs();
         ValidateRequestForField();
         using (clsEmployee employee = new clsEmployee())
         {
             employee.Username = Request.Cookies["Speedo"]["UserName"];
             employee.Fill();
             if (employee.RcCode == "AUD")
             {
                 ddlAuthorized.SelectedValue = "jun.sagcal";
             }
             else
             {
                 ddlAuthorized.SelectedValue = clsDivision.GetDivisionHead(employee.DivisionCode);
             }
         }
         txtRequestor.Text            = clsEmployee.GetName(Request.Cookies["Speedo"]["UserName"], EmployeeNameFormat.FirstLast);
         ddlEndorsedBy1.SelectedValue = clsModuleApprover.ApproverEmployee(Request.Cookies["Speedo"]["UserName"], clsModule.ATWModule, "1");
         //btnPrint.Attributes.Add("onclick", "this.disabled=true;" + GetPostBackEventReference(btnPrint).ToString());
         //btnSend.Attributes.Add("onclick", "this.disabled=true;" + GetPostBackEventReference(btnSend).ToString());
     }
 }
Esempio n. 4
0
    protected void LoadExecutiveDDLs()
    {
        ddlEndorsedBy1.Items.Clear();
        //ddlEndorsedBy1.DataSource = clsEmployee.DSLEmployeeListManagerVPSupervisor(Request.Cookies["Speedo"]["UserName"]);
        ddlEndorsedBy1.DataSource     = clsModuleApprover.GetDSLFinanceApprover(clsModule.RFPModule, "1");
        ddlEndorsedBy1.DataValueField = "pvalue";
        ddlEndorsedBy1.DataTextField  = "ptext";
        ddlEndorsedBy1.DataBind();
        ddlEndorsedBy1.Items.Insert(0, new ListItem("-", String.Empty));
        ddlEndorsedBy1.SelectedIndex = 0;

        ddlEndorsedBy2.Items.Clear();
        //ddlEndorsedBy2.DataSource = clsEmployee.DSLEmployeeListManagerVPSupervisor(Request.Cookies["Speedo"]["UserName"]);
        ddlEndorsedBy1.DataSource     = clsModuleApprover.GetDSLFinanceApprover(clsModule.RFPModule, "1");
        ddlEndorsedBy2.DataValueField = "pValue";
        ddlEndorsedBy2.DataTextField  = "pText";
        ddlEndorsedBy2.DataBind();
        ddlEndorsedBy2.Items.Insert(0, new ListItem("-", String.Empty));
        ddlEndorsedBy2.SelectedIndex = 0;

        ddlAuthorized.Items.Clear();
        //ddlAuthorized.DataSource = clsEmployee.DSLEmployeeListManagerVPSupervisor(Request.Cookies["Speedo"]["UserName"]);
        ddlAuthorized.DataSource     = clsModuleApprover.GetDSLFinanceApprover(clsModule.RFPModule, "2");
        ddlAuthorized.DataValueField = "pValue";
        ddlAuthorized.DataTextField  = "pText";
        ddlAuthorized.DataBind();

        using (clsEmployee employee = new clsEmployee())
        {
            employee.Username = ddlExecutive.SelectedValue;
            employee.Fill();
            ddlAuthorized.SelectedValue = clsDivision.GetDivisionHead(employee.DivisionCode);
        }
    }
Esempio n. 5
0
        /// <summary>
        /// 特殊记录内容格式Xml的获取
        /// </summary>
        public override string m_strGetTrackXml()
        {
            if (m_objRecordContent == null)
            {
                return("");
            }

            clsShuXueZhiLiaoyesContent_xj objContent = ((clsShuXueZhiLiaoyesContent_xj)m_objRecordContent);
            string strText = m_strGetHeaderText();

            string      strCreateUserName = "";
            clsEmployee objEmployee       = new clsEmployee(m_objRecordContent.m_strCreateUserID);

            if (objEmployee != null)
            {
                strCreateUserName = objEmployee.m_StrLastName;
            }

            string strXML1 = ctlRichTextBox.clsXmlTool.s_strMakeTextXml(strText, objContent.m_strCreateUserID, strCreateUserName, System.Drawing.Color.White);
            // string strXML2 = ctlRichTextBox.clsXmlTool.s_strMakeTextXml("\n    死亡时间:" + objContent.m_dtmDeadDate.ToString("yyyy年MM月dd日HH时mm分"), objContent.m_strCreateUserID, strCreateUserName, System.Drawing.Color.White);
            string strXML2 = ctlRichTextBox.clsXmlTool.s_strMakeTextXml("\n    时间:" + objContent.m_dtmDoctorDate.ToString("yyyy年MM月dd日HH时mm分"), objContent.m_strCreateUserID, strCreateUserName, System.Drawing.Color.White);
            string strXML3 = ctlRichTextBox.clsXmlTool.s_strMakeTextXml("\n    输血目的:" + objContent.m_strShuXueMuDi, objContent.m_strCreateUserID, strCreateUserName, System.Drawing.Color.White);
            string strXML4 = ctlRichTextBox.clsXmlTool.s_strMakeTextXml("\n  医师签字:" + objContent.m_strRecordName, objContent.m_strCreateUserID, strCreateUserName, System.Drawing.Color.White);
            //   string strXML5 = ctlRichTextBox.clsXmlTool.s_strMakeTextXml("\n  手术者:" + m_strGetName(objContent.m_strAttendeeNameArr), objContent.m_strCreateUserID, strCreateUserName, System.Drawing.Color.White);
            string strXML5 = ctlRichTextBox.clsXmlTool.s_strMakeTextXml("\n  输血成分:" + objContent.m_strShuXueChengFen, objContent.m_strCreateUserID, strCreateUserName, System.Drawing.Color.White);
            string strXML6 = ctlRichTextBox.clsXmlTool.s_strMakeTextXml("\n   临床诊断:" + objContent.m_strZhenDuan, objContent.m_strCreateUserID, strCreateUserName, System.Drawing.Color.White);
            //  string strXML14 = ctlRichTextBox.clsXmlTool.s_strMakeTextXml("\n   主持人审阅签名:" + objContent.m_strCompereName, objContent.m_strCreateUserID, strCreateUserName, System.Drawing.Color.White);

            string strXML = ctlRichTextBox.s_strCombineXml(new string[] { strXML1, strXML2, strXML3, objContent.m_strShuXueMuDiXML, strXML4, strXML5, objContent.m_strShuXueChengFenXML, strXML6, objContent.m_strZhenDuanXML });

            return(strXML);
        }
Esempio n. 6
0
        public DataSet GetEmpList(clsEmployee ObjEmpList)
        {
            Hashtable htparams = new Hashtable
            {
                { "in_S_No", ObjEmpList.S_No },
                { "in_emp_id", ObjEmpList.emp_id },
                { "in_emp_firstname", ObjEmpList.empFtName },
                { "in_emp_middlename", ObjEmpList.empMName },
                { "in_emp_lastname", ObjEmpList.empLName },
                { "in_emp_doj", ObjEmpList.empJOD },
                { "in_emp_dob", ObjEmpList.empDOB },
                { "in_emp_dept", ObjEmpList.empDepartment },
                { "in_emp_design", ObjEmpList.empDesignation },
                { "in_emp_login", ObjEmpList.LoginId },
                { "in_emp_pwd", ObjEmpList.empPWD },
                { "in_emp_mobile", ObjEmpList.empMobile },
                { "in_emp_email", ObjEmpList.empEmail },
                { "in_emp_mgr", ObjEmpList.empManager },
                { "in_CreatedBy", ObjEmpList.CreatedBy },
                { "in_OpName", ObjEmpList.OpName },
                { "in_emp_status", ObjEmpList.empStatus },
                { "in_emp_panno", ObjEmpList.empPanNo },
                { "in_emp_adharno", ObjEmpList.empAdharNo },
                { "in_emp_address", ObjEmpList.empAddress },
                { "in_emp_passportno", ObjEmpList.emppassportno },
                { "in_emp_pasexpirydate", ObjEmpList.emppasexpirydate },
                { "in_ResumeUpload", ObjEmpList.ResumeUpload },
                { "in_ResumeFilePath", ObjEmpList.ResumeFilePath },
                { "in_emp_location", ObjEmpList.emplocation },
                { "in_ImageUpload", ObjEmpList.ImageUpload },
                { "in_ImageFilePath", ObjEmpList.ImageFilePath },
            };

            return(ExecuteDataSet("ManageEmployee", htparams));
        }
Esempio n. 7
0
        public int Employee_InsertUpdate(clsEmployee objclsemp)
        {
            Hashtable htparams = new Hashtable {
                { "in_S_No", objclsemp.S_No },
                { "in_emp_id", objclsemp.EmpID },
                { "in_emp_firstname", objclsemp.empFtName },
                { "in_emp_middlename", objclsemp.empMName },
                { "in_emp_lastname", objclsemp.empLName },
                { "in_emp_doj", objclsemp.empJOD },
                { "in_emp_dob", objclsemp.empDOB },
                { "in_emp_dept", objclsemp.empDepartment },
                { "in_emp_design", objclsemp.empDesignation },
                { "in_emp_login", objclsemp.LoginId },
                { "in_emp_pwd", objclsemp.empPWD },
                { "in_emp_mobile", objclsemp.empMobile },
                { "in_emp_email", objclsemp.empEmail },
                { "in_emp_mgr", objclsemp.empManager },
                { "in_CreatedBy", objclsemp.CreatedBy },
                { "in_OpName", objclsemp.OpName },
                { "in_emp_status", objclsemp.empStatus },
                { "in_emp_panno", objclsemp.empPanNo },
                { "in_emp_adharno", objclsemp.empAdharNo },
                { "in_emp_address", objclsemp.empAddress },
                { "in_emp_passportno", objclsemp.emppassportno },
                { "in_emp_pasexpirydate", objclsemp.emppasexpirydate },
                { "in_ResumeUpload", objclsemp.ResumeUpload },
                { "in_ResumeFilePath", objclsemp.ResumeFilePath },
                { "in_emp_location", objclsemp.emplocation },
                { "in_ImageUpload", objclsemp.ImageUpload },
                { "in_ImageFilePath", objclsemp.ImageFilePath },
            };
            int IsSucess = ExecuteNonQuery("ManageEmployee", htparams);

            return(IsSucess);
        }
        /// <summary>
        /// 特殊记录内容格式Xml的获取
        /// </summary>
        public override string m_strGetTrackXml()
        {
            if (m_objRecordContent == null)
            {
                return("");
            }

            clsBeforeOperationDiscussRecordContent objContent = ((clsBeforeOperationDiscussRecordContent)m_objRecordContent);
            string strText = m_strGetHeaderText();

            string      strCreateUserName = "";
            clsEmployee objEmployee       = new clsEmployee(m_objRecordContent.m_strCreateUserID);

            if (objEmployee != null)
            {
                strCreateUserName = objEmployee.m_StrLastName;
            }
            //须与m_strGetTrackText()项目保持一致,否则会导致修改痕迹移位
            string strXML1 = ctlRichTextBox.clsXmlTool.s_strMakeTextXml(strText, objContent.m_strCreateUserID, strCreateUserName, System.Drawing.Color.White);
            string strXML2 = ctlRichTextBox.clsXmlTool.s_strMakeTextXml("\n地点:", objContent.m_strCreateUserID, strCreateUserName, System.Drawing.Color.White);
            string strXML3 = ctlRichTextBox.clsXmlTool.s_strMakeTextXml("\n参加人员:" + m_strGetName(m_objRecordContent.objSignerArr, "lsvAttend"), objContent.m_strCreateUserID, strCreateUserName, System.Drawing.Color.White);
            string strXML4 = ctlRichTextBox.clsXmlTool.s_strMakeTextXml("\n主持人:" + m_strGetName(m_objRecordContent.objSignerArr, "lsvCompere"), objContent.m_strCreateUserID, strCreateUserName, System.Drawing.Color.White);
            string strXML5 = ctlRichTextBox.clsXmlTool.s_strMakeTextXml("\n讨论内容:\n", objContent.m_strCreateUserID, strCreateUserName, System.Drawing.Color.White);

            string strXML = ctlRichTextBox.clsXmlTool.s_strCombineXml(new string[] { strXML1, strXML2, objContent.m_strAddressXML, strXML3, strXML4, strXML5, objContent.m_strDiscussContentXML });

            //string strXML=ctlRichTextBox.s_strCombineXml(new string[]{strXML1,strXML2,objContent.m_strAddressXML,strXML5,objContent.m_strDiscussContentXML});
            return(strXML);
        }
Esempio n. 9
0
        /// <summary>
        /// 显示记录已被他人修改信息(可覆盖提供新的实现)
        /// </summary>
        protected virtual bool m_bolShowRecordModified(string p_strModifyUserID, string p_strModifyTime)
        {
            //			clsPublicFunction.ShowInformationMessageBox("对不起,该记录已被他人修改!");
            if (p_strModifyUserID == null || p_strModifyUserID == "")
            {
                return(false);
            }
            if (p_strModifyTime == null || p_strModifyTime == "")
            {
                return(false);
            }
            string m_strModifyTime;
            string m_strModifyUserName;

            try
            {
                m_strModifyUserName = new clsEmployee(p_strModifyUserID).m_StrFirstName;
                m_strModifyTime     = DateTime.Parse(p_strModifyTime).ToString("yyyy年MM月dd日 HH:mm:ss");
            }
            catch
            {
                return(false);
            }
            if (clsPublicFunction.ShowQuestionMessageBox("对不起,该记录已被 " + m_strModifyUserName + " 于 " + m_strModifyTime + " 修改,是否更新记录?") == DialogResult.Yes)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Esempio n. 10
0
        /// <summary>
        /// 显示记录已被删除信息(可覆盖提供新的实现)
        /// </summary>
        protected virtual void m_mthShowRecordDeleted(string p_strDeleteUserID, string p_strDeleteTime)
        {
            if (p_strDeleteUserID == null || p_strDeleteUserID == "")
            {
                return;
            }
            if (p_strDeleteTime == null || p_strDeleteTime == "")
            {
                return;
            }
            string m_strDeleteTime;
            string m_strDeleteUserName;

            try
            {
                m_strDeleteUserName = new clsEmployee(p_strDeleteUserID).m_StrFirstName;
                m_strDeleteTime     = DateTime.Parse(p_strDeleteTime).ToString("yyyy年MM月dd日 HH:mm:ss");
            }
            catch
            {
                return;
            }

            clsPublicFunction.ShowInformationMessageBox("对不起,该记录已被 " + m_strDeleteUserName + " 于 " + m_strDeleteTime + " 删除!");
        }
Esempio n. 11
0
    ///////////////////////////////
    ///////// Page Events /////////
    ///////////////////////////////

    protected void Page_Load(object sender, EventArgs e)
    {
        clsSpeedo.Authenticate();

        if (!Page.IsPostBack)
        {
            trNoRequest.Visible = true;
            this.MakeCart();

            txtRequestorName.Text   = clsEmployee.GetName(Request.Cookies["Speedo"]["UserName"], EmployeeNameFormat.LastFirst);
            hdnDepartmentCode.Value = clsEmployee.GetDepartmentCode(Request.Cookies["Speedo"]["UserName"]);

            using (clsEmployee objEmployee = new clsEmployee())
            {
                objEmployee.Username = RFI.ProcurementHead;
                objEmployee.Fill();
                txtProcurementName.Text = objEmployee.LastName + ", " + objEmployee.FirstName;
            }

            DataTable tblDepartmentApprover = clsDepartmentApprover.DSLApproverDepartment(hdnDepartmentCode.Value, EFormType.RFI);
            ddlApprover.DataSource     = tblDepartmentApprover;
            ddlApprover.DataValueField = "pvalue";
            ddlApprover.DataTextField  = "ptext";
            ddlApprover.DataBind();
            if (ddlApprover.Items.Count == 0)
            {
                ddlApprover.Items.Add(new ListItem("No Approver Defined", "none"));
            }
            hdnProcurementCode.Value = RFI.ProcurementHead;
            dteDateNeeded.MinDate    = clsDateTime.AddDaysWorking(5);
            dteDateNeeded.Date       = clsDateTime.AddDaysWorking(5);
        }
    }
			//	private string[] m_strKeysArr1 = {"手术日期","手术日期>>至"};
//			private string[] m_strKeysArr2 = {"√","拟施手术名称>>超声乳化白内障摘除术"};
//			private string[] m_strKeysArr02 = {" 超声乳化白内障摘除术"};
			#region 生成CheckBox的打印文本
			/// <summary>
			/// 生成CheckBox的打印文本
			/// </summary>
			/// <param name="p_hasItem">哈希表</param>
			/// <param name="p_strName">内容数组,数组第一项为标识,从第二项开始才是键</param>
			/// <param name="p_strTextAll">正常文本</param>
			/// <param name="p_strTextXML">XML文本</param>
			protected  void m_mthMakeCheckText(string[] p_strName,ref string p_strTextAll, ref string p_strTextXML)
			{
				if(m_hasItems == null || m_hasItems.Count < 1 || p_strName == null)
					return;
				bool blnPrintFirst = false;
				string strFirstName = new clsEmployee(m_objContent.m_strCreateUserID).m_StrFirstName;
				string strDH_XML = ctlRichTextBox.clsXmlTool.s_strMakeTextXml("、",m_objContent.m_strCreateUserID,strFirstName,Color.Black,m_strMakedate);
				p_strTextAll += p_strName[0];
				string strXML = ctlRichTextBox.clsXmlTool.s_strMakeTextXml(p_strName[0],m_objContent.m_strCreateUserID,strFirstName,Color.Black,m_strMakedate);
				if(p_strTextXML != "")
					p_strTextXML = ctlRichTextBox.s_strCombineXml(new string[]{p_strTextXML,strXML});
				else
					p_strTextXML = strXML;
				for(int i =1; i < p_strName.Length; i++)
				{
					if(m_hasItems.Contains(p_strName[i]) == true)
					{
						int index = p_strName[i].LastIndexOf(">");
						string strText = p_strName[i];
						if (index > 0)
							strText = p_strName[i].Substring(index+1);
						p_strTextAll += (blnPrintFirst == true ? "、" : "") + strText;
						p_strTextXML = ctlRichTextBox.s_strCombineXml(new string[]{p_strTextXML,(blnPrintFirst == true ? strDH_XML : "<root />"),ctlRichTextBox.clsXmlTool.s_strMakeTextXml(strText,m_objContent.m_strCreateUserID,strFirstName,Color.Black,m_strMakedate)});
						blnPrintFirst = true;
					}
				}
				//p_strTextAll += ";";
				p_strTextXML = ctlRichTextBox.s_strCombineXml(new string[]{p_strTextXML,ctlRichTextBox.clsXmlTool.s_strMakeTextXml(";",m_objContent.m_strCreateUserID,strFirstName,Color.Black,m_strMakedate)});
			}	
Esempio n. 13
0
        public ActionResult insertEmployee(clsEmployee objEmp)
        {
            //Employee emp = new Employee();
            //emp.DepartmentID = objEmp.DepartmentID;

            return(View());
        }