protected void iBtnInitPasswd_Click(object sender, ImageClickEventArgs e) { EmpInfos emp = new EmpInfos(); string en_use_yn = WebUtility.GetConfig("ENCRYPTION_USE_YN").ToUpper(); string encryption_oneway_mode = WebUtility.GetConfig("ENCRYPTION_ONEWAY_MODE").ToUpper(); //bool isOK = emp.InitEmpPasswd(int.Parse(Request["empId"]), GetEncriptString(DEFAULT_PASS)); // 패스워드 암호화 string encDEFAULT_PASS; if (en_use_yn.Equals("Y")) { encDEFAULT_PASS = FormsAuthentication.HashPasswordForStoringInConfigFile(DEFAULT_PASS, encryption_oneway_mode); } else { encDEFAULT_PASS = DEFAULT_PASS; } bool isOK = emp.InitEmpPasswd(Convert.ToInt32(empId), encDEFAULT_PASS); if (isOK) { Literal1.Text = JSHelper.GetAlertScript("패스워드를 초기화 하였습니다.", false); } else { Literal1.Text = JSHelper.GetAlertScript("패스워드를 초기화 하는데 실패하였습니다.", false); } }
private void SearchEmpInfo() { EmpInfos emp = new EmpInfos(); string searchType = WebUtility.GetByValueDropDownList(ddlSchType); string searchText = this.txtSearch.Text.Trim(); int useYN = WebUtility.GetIntByValueRadioButtonList(radType); if (useYN == 0) { ibtnRollback.Visible = true; } else { ibtnRollback.Visible = false; } UltraWebGrid1.Clear(); DataSet ds = emp.GetEmpInfoSearch(searchType, searchText, useYN); UltraWebGrid1.DataSource = ds; UltraWebGrid1.DataBind(); lblRowCount.Text = ds.Tables[0].Rows.Count.ToString(); }
private void GridDataBinding() { string query = @" SELECT ISNULL(CE.EMP_REF_ID,0) as EMP_REF_ID, RTRIM(ISNULL(DE.DEPT_NAME,'')) as DEPT_NAME, ISNULL(CE.EMP_NAME,'') as EMP_NAME, MAX(ISNULL(CE.EMP_EMAIL,'')) as EMP_EMAIL FROM KPI_INFO KI, COM_EMP_INFO CE, COM_DEPT_INFO DE, REL_DEPT_EMP RD, KPI_RESULT KR, (SELECT " + hdnMM.Value + @" as TMCODE, MON_" + hdnMM.Value + @"_FLAG as CHECK_YN, KPI_REF_ID FROM KPI_TERM WHERE KPI_TERM_TYPE = 0) TM WHERE KI.KPI_REF_ID *= KR.KPI_REF_ID AND KI.KPI_REF_ID *= TM.KPI_REF_ID AND KI.CHAMPION_EMP_ID *= CE.EMP_REF_ID AND RD.EMP_REF_ID = CE.EMP_REF_ID AND RD.DEPT_REF_ID = DE.DEPT_REF_ID AND TM.CHECK_YN = 1 AND KR.CHECKSTATUS IN (" + ddlApplyYN.SelectedValue + @") AND KR.TMCODE = " + hdnMM.Value + @" GROUP BY DE.DEPT_REF_ID,DE.DEPT_NAME,CE.EMP_REF_ID, CE.EMP_NAME "; MicroBSC.Data.DBAgent gDbAgent = new MicroBSC.Data.DBAgent(System.Configuration.ConfigurationManager.ConnectionStrings["MainDB"].ConnectionString); DataSet ds = gDbAgent.FillDataSet(query, "data"); EmpInfos emp = new EmpInfos(); UltraWebGrid1.DataSource = ds.Tables[0].DefaultView; UltraWebGrid1.DataBind(); }
private void SendMail(int step) { string strFrom = System.Configuration.ConfigurationSettings.AppSettings["Mail.From"].ToString(); string strServer = System.Configuration.ConfigurationSettings.AppSettings["Mail.SMTP"].ToString(); string strUrl = System.Configuration.ConfigurationSettings.AppSettings["Mail.Url"].ToString(); Biz_Bsc_Kpi_Info kpiInfo = new Biz_Bsc_Kpi_Info(this.IEstTermRefID, this.IKpiRefID); EmpInfos empinfo = new EmpInfos(kpiInfo.Ichampion_emp_id); string strSubject = GetFileText("../_common/SendMailTemplate/BSC_PC_NOTE_subject.txt"); string strBody = GetFileText("../_common/SendMailTemplate/BSC_PC_NOTE_Content.txt"); string kpi_info = @"등록일시 : " + DateTime.Now.ToString() + @"<br> KPI ID : " + kpiInfo.Ikpi_code + @"<br> 측정월 : " + this.IYMD + @"<br> KPI Name : " + kpiInfo.Ikpi_name + @"<br> KPI Champion : " + empinfo.Emp_Name + @"<br>"; strBody = strBody.Replace("[KPI_INFO]", kpi_info); string ceocomment = ""; //if (step == 1) // ceocomment = "DUE DATE : " + "" + "<br>" + txtComment1.Text.Replace("\r\n", "<br>"); //else if (step == 2) // ceocomment = "DUE DATE : " + "" + "<br>" + txtComment2.Text.Replace("\r\n", "<br>"); strBody = strBody.Replace("[CEO_COMMENT]", ceocomment); strBody = strBody.Replace("[MAIL.URL]", strUrl); strBody = strBody.Replace("[TODAY]", DateTime.Today.ToString()); // strServer = "mail.micropolis.co.kr"; if (ceocomment.Trim().Length > 0) { SendMail(strFrom, empinfo.Emp_Email, strSubject, strBody, "", strServer); } }
private void SetAllTimeTop() { emp_ref_id = ((SiteIdentity)Context.User.Identity).Emp_Ref_ID; EmpInfos empInfo = new EmpInfos(emp_ref_id); lblDeptName.Text = empInfo.Dept_Name; lblLoginID.Text = empInfo.LoginID; lblEmpName.Text = empInfo.Emp_Name; }
protected DataTable ModifyUserTable(string receiver_arr) { EmpInfos emp = new EmpInfos(); DataTable dataTable = emp.GetEmpInfoByEmpIDArr(receiver_arr).Tables[0]; UserDataTable = dataTable; return(dataTable); }
protected void TreeView2_SelectedNodeChanged(object sender, EventArgs e) { EmpInfos emp = new EmpInfos(); DataTable dt = emp.GetEmpInfoByDeptID(TreeView2.SelectedValue).Tables[0]; UltraWebGrid1.DataSource = dt; UltraWebGrid1.DataBind(); TreeView1.Nodes.Clear(); }
protected void trvComDept_SelectedNodeChanged(object sender, EventArgs e) { string deptId = trvComDept.SelectedNode.Value; EmpInfos emp = new EmpInfos(); DataSet rDs = emp.GetEmpInfoByDeptID(deptId); ugrdTargetGrid.DataSource = rDs; ugrdTargetGrid.DataBind(); //lblTotal.Text = ds.Tables[0].Rows.Count.ToString(); }
protected void UltraWebGrid1_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e) { DataRowView dr = (DataRowView)e.Data; EmpInfos empInfo = new EmpInfos(); int empId = int.Parse(dr["EMP_REF_ID"].ToString()); e.Row.Cells.FromKey("MODIFY").Value = string.Format( "<a href=\"#null\" onclick=\"openwindow('Modify', '{0}');\"><img src='../images/drafts.gif' border='0'></a>", empId.ToString()); e.Row.Cells.FromKey("ROLE").Value = string.Format( "<a href=\"#null\" onclick=\"gfOpenWindow('ctl2100_Role.aspx?emp_ref_id={0}&CCB1={1}', 600, 460, true, true, 'editForm')\"><img src='../images/drafts.gif' border='0'></a>", empId.ToString(), this.ICCB1); e.Row.Cells.FromKey("EMP_NAMES").Value = empInfo.GetRoleNamesArray(empId); }
private void SetAllTimeTop() { biz_type_code = (Request["biz_type_code"] != null && Request["biz_type_code"].Length > 0) ? Request["biz_type_code"] : ""; EmpID = (Request["EmpID"] != null && Request["EmpID"].Length > 0) ? int.Parse(Request["EmpID"]) : 0; if (biz_type_code != null && biz_type_code.Length > 0 && EmpID > 0) { } else { Literal1.Text = JSHelper.GetAlertScript("잘못 된 경로로 접근하셨습니다.", true); } EmpInfos emp = new EmpInfos(EmpID); txtEmpID.Text = EmpID.ToString(); txtEmpName.Text = emp.Emp_Name; }
/// <summary> /// 트리변경시 사용자검색 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void trvDept_SelectedNodeChanged(object sender, EventArgs e) { divAreaAppLine.Style["display"] = "block"; TreeNode trnDept = trvDept.SelectedNode; if (trnDept != null) { string strDeptNm = trnDept.Text; string strDeptID = trnDept.Value; EmpInfos objEmp = new EmpInfos(); DataSet rDs = objEmp.GetEmpInfoByDeptID(strDeptID); ugrdEmpList.Clear(); ugrdEmpList.DataSource = rDs; ugrdEmpList.DataBind(); } }
public void SetNoticeInfo() { Biz_Bsc_Communication_Notice objBSC = new Biz_Bsc_Communication_Notice(this.INoticeRefID); lblReadCount.Text = objBSC.Iread_count.ToString(); lblCreateDate.Text = objBSC.Create_date.ToLongDateString(); wdcFrom.Value = objBSC.Inotice_from.ToLongDateString(); wdcTo.Value = objBSC.Inotice_to.ToLongDateString(); txtSubject.Text = objBSC.Ititle; txtContent.Value = objBSC.Idetails; ltrContent.Text = objBSC.Idetails; chkPopUpYn.Checked = (objBSC.Ishow_pop_up == "Y") ? true : false; EmpInfos objEMP = new EmpInfos(objBSC.Create_user); lblWriterName.Text = objEMP.Emp_Name; if (gUserInfo.Emp_Ref_ID == objBSC.Create_user) { txtContent.Visible = true; leftLayer.Visible = false; this.iBtnSave.Visible = false; this.iBtnModify.Visible = true; this.iBtnDelete.Visible = true; this.wdcFrom.Enabled = true; this.wdcTo.Enabled = true; this.chkPopUpYn.Enabled = true; } else { txtContent.Visible = false; leftLayer.Visible = true; this.iBtnSave.Visible = false; this.iBtnModify.Visible = false; this.iBtnDelete.Visible = false; this.wdcFrom.Enabled = false; this.wdcTo.Enabled = false; this.chkPopUpYn.Enabled = false; int intRtn = objBSC.AddClickCount(this.INoticeRefID, gUserInfo.Emp_Ref_ID); } }
private void SetPageData() { txtPassword.Text = ""; txtCfmPassword.Text = ""; emp_ref_id = ((SiteIdentity)Context.User.Identity).Emp_Ref_ID; EmpInfos empInfo = new EmpInfos(emp_ref_id); if (EN_USE_YN.Equals("Y")) { this.txtEmail.Text = DataTypeUtility.Decrypt(empInfo.Emp_Email, ENCRYPTION_KEY); this.txtCellPhone.Text = DataTypeUtility.Decrypt(empInfo.Cell_Phone, ENCRYPTION_KEY); } else { this.txtEmail.Text = empInfo.Emp_Email; this.txtCellPhone.Text = empInfo.Cell_Phone; } }
protected void iBtnRoleDel_Click(object sender, ImageClickEventArgs e) { EmpInfos empLoginUser = new EmpInfos(gUserInfo.Emp_Ref_ID); string from = empLoginUser.Emp_Email; string url = System.Configuration.ConfigurationManager.AppSettings["Mail.Url"].ToString(); string server = System.Configuration.ConfigurationManager.AppSettings["Mail.SMTP"].ToString(); CheckBox chk; UltraGridRow row; TemplatedColumn col; for (int i = 0; i < UltraWebGrid1.Rows.Count; i++) { row = UltraWebGrid1.Rows[i]; col = (TemplatedColumn)row.Band.Columns.FromKey("selchk"); chk = (CheckBox)((CellItem)col.CellItems[row.BandIndex]).FindControl("cBox"); if (chk.Checked) { try { SendMail( from , row.Cells.FromKey("EMP_EMAIL").ToString() , GetFileText("../_common/SendMailTemplate/BSC_Subject.txt") , GetFileText("../_common/SendMailTemplate/BSC_Content.txt").Replace("[TODAY]", DateTime.Now.ToString("yyyy년 MM월 dd일 hh:mm")).Replace("[RESULT_DATE]", DateTime.Now.ToString("yyyy-MM-dd")).Replace("[MAIL.URL]", url) , url , server ); } catch (Exception ex) { ltrScript.Text = JSHelper.GetAlertScript("발송 중 오류가 발생하였습니다.." + ex.Message, false); return; } } } ltrScript.Text = JSHelper.GetAlertScript("정상적으로 발송되었습니다.", true); }
protected void Callback1_Callback(object sender, SJ.Web.UI.CallBackEventArgs e) { EmpInfos emp = new EmpInfos(); if (e.Parameter == "") { ltrScript.Text = JSHelper.GetAlertScript("아이디를 입력하십시요.", false); ltrScript.RenderControl(e.Output); return; } if (emp.CheckLoginID(e.Parameter)) { ltrScript.Text = JSHelper.GetAlertScript("사용 가능한 아이디 입니다.", false); } else { ltrScript.Text = JSHelper.GetAlertScript("존재하는 아이디 입니다.", false); } ltrScript.RenderControl(e.Output); }
public void SetNFaqInfo() { Biz_Bsc_Faq objBSC = new Biz_Bsc_Faq(); DataTable dt = objBSC.SelectBscFaqIdxAll(int.Parse(FAQ_REF_ID)); int emp = 0; if (dt.Rows.Count > 0) { lblCreateDate.Text = string.Format("{0:yyyy-MM-dd}", dt.Rows[0]["CREATE_DATE"]); txtSubject.Text = dt.Rows[0]["FAQ_QUESTION"].ToString(); txtContent.Value = dt.Rows[0]["FAQ_ANSWER"].ToString(); ltrContent.Text = dt.Rows[0]["FAQ_ANSWER"].ToString(); emp = int.Parse(dt.Rows[0]["CREATE_USER"].ToString()); EmpInfos objEMP = new EmpInfos(emp); lblWriterName.Text = objEMP.Emp_Name; } if (gUserInfo.Emp_Ref_ID == emp) { txtContent.Visible = true; leftLayer.Visible = false; this.iBtnSave.Visible = false; this.iBtnModify.Visible = true; this.iBtnDelete.Visible = true; } else { txtContent.Visible = false; leftLayer.Visible = true; this.iBtnSave.Visible = false; this.iBtnModify.Visible = false; this.iBtnDelete.Visible = false; // int intRtn = objBSC.AddClickCount(this.INoticeRefID, gUserInfo.Emp_Ref_ID); } }
private void ModifyPassword(int empId) { string sErr = ""; if (!IsMandatory(out sErr, true)) { PageUtility.ExecuteScript(string.Format("{0}", sErr)); return; } string pw = ""; if (EN_USE_YN.Equals("Y")) { //pw = GetEncriptString(txtPassword.Text.ToString()); pw = FormsAuthentication.HashPasswordForStoringInConfigFile(txtPassword.Text.ToString(), ENCRYPTION_ONEWAY_MODE); } else { pw = txtPassword.Text.ToString(); } EmpInfos emp = new EmpInfos(); bool isOK = emp.InitEmpPasswd(empId, pw); if (isOK) { ltrScript.Text = JSHelper.GetAlertScript("비밀번호를 재설정 하였습니다.", true); } else { ltrScript.Text = JSHelper.GetAlertScript("비밀번호를 재설정 하는데 실패하였습니다.", false); } }
public bool SendMailBatch(bool isReturn) { if (PageUtility.GetAppConfig("Mail.UseDraftMailYN") == "N") { return(true); } string sC_EMP_MAIL = ""; string sP_EMP_MAIL = ""; string sN_EMP_MAIL = ""; string sFile = "Mail_Draft.htm"; EmpInfos objEmp = new EmpInfos(gUserInfo.Emp_Ref_ID); Biz_Com_Approval_Prc objPrc = new Biz_Com_Approval_Prc(); bool bRtn = objPrc.GetSendMailUser(this.IApp_Ref_Id, this.IVersion_No, gUserInfo.Emp_Ref_ID, out sC_EMP_MAIL, out sP_EMP_MAIL, out sN_EMP_MAIL); if (!bRtn) { return(false); } if (isReturn && (!PageUtility.CheckMailAddress(sC_EMP_MAIL) || !PageUtility.CheckMailAddress(sN_EMP_MAIL))) { return(false); } if (!isReturn && (!PageUtility.CheckMailAddress(sC_EMP_MAIL) || !PageUtility.CheckMailAddress(sP_EMP_MAIL))) { return(false); } DataTable dtMailParam = new DataTable("PARAM"); dtMailParam.Columns.Add("KEY", typeof(string)); dtMailParam.Columns.Add("VAL", typeof(string)); MicroBSC.BSC.Biz.Biz_Bsc_Kpi_Info objKPI = new MicroBSC.BSC.Biz.Biz_Bsc_Kpi_Info(); DataTable dtKpi = new DataTable(); if (this.IBiz_Type == Biz_Type.biz_type_kpi_docbatch) { dtKpi = objKPI.GetKpiListForBatchDraft(GetRequestByInt("ESTTERM_REF_ID"), "", "", "Y", gUserInfo.Emp_Ref_ID, GetRequest("KPI_REF_ID", "")).Tables[0]; } else if (this.IBiz_Type == Biz_Type.biz_type_kpi_rstbatch) { dtKpi = objKPI.GetKpiResultListForBatchDraft(GetRequestByInt("ESTTERM_REF_ID"), GetRequest("YMD"), "", "", "Y", gUserInfo.Emp_Ref_ID, GetRequest("KPI_REF_ID")).Tables[0]; } else if (this.IBiz_Type == Biz_Type.biz_type_target_resultbatch) { dtKpi = objKPI.GetKpiResultListForBatchDraft(GetRequestByInt("ESTTERM_REF_ID"), GetRequest("YMD"), "", "", "N", gUserInfo.Emp_Ref_ID, GetRequest("KPI_REF_ID")).Tables[0]; } bool rtnValue = false; foreach (DataRow drKpi in dtKpi.Rows) { Biz_Com_Approval_Info objMst = new Biz_Com_Approval_Info(DataTypeUtility.GetToDecimal(drKpi["APP_REF_ID"]), 1); string strVPath = Request.ApplicationPath; string strSHost = Request.Url.Host; string strSPort = Request.Url.Port.ToString(); string strProto = Request.Url.Scheme; strVPath = (strVPath == "/") ? "" : strVPath; string strFullPath = strProto + "://" + strSHost + ":" + strSPort + strVPath; DataRow dr = null; dr = dtMailParam.NewRow(); dr["KEY"] = "[SITE_URL]"; dr["VAL"] = strFullPath; dtMailParam.Rows.Add(dr); dr = dtMailParam.NewRow(); dr["KEY"] = "[BIZ_TYPE]"; dr["VAL"] = Biz_Com_Approval_Info.GetBizTypeName(Biz_Type.biz_type_kpi_doc); dtMailParam.Rows.Add(dr); dr = dtMailParam.NewRow(); dr["KEY"] = "[APP_CODE]"; dr["VAL"] = objMst.IApp_Code; dtMailParam.Rows.Add(dr); dr = dtMailParam.NewRow(); dr["KEY"] = "[TITLE]"; dr["VAL"] = objMst.ITitle; dtMailParam.Rows.Add(dr); dr = dtMailParam.NewRow(); dr["KEY"] = "[EMP_NAME]"; dr["VAL"] = objEmp.Emp_Name; dtMailParam.Rows.Add(dr); dr = dtMailParam.NewRow(); dr["KEY"] = "[DEPT_NAME]"; dr["VAL"] = objEmp.Dept_Name; dtMailParam.Rows.Add(dr); dr = dtMailParam.NewRow(); dr["KEY"] = "[TRX_DATE]"; dr["VAL"] = objMst.IUpdate_Date.ToShortDateString(); dtMailParam.Rows.Add(dr); dr = dtMailParam.NewRow(); dr["KEY"] = "[TODAY]"; dr["VAL"] = DateTime.Now.ToString(); dtMailParam.Rows.Add(dr); dr = dtMailParam.NewRow(); dr["KEY"] = "[DRAFT_TYPE]"; dr["VAL"] = (isReturn) ? "반려" : "승인요청"; dtMailParam.Rows.Add(dr); string sMailTitle = ""; if (this.IBiz_Type == Biz_Type.biz_type_kpi_docbatch) { sMailTitle = "[성과관리 - " + Biz_Com_Approval_Info.GetBizTypeName(Biz_Type.biz_type_kpi_doc) + " 건 알림메일]"; } else if (this.IBiz_Type == Biz_Type.biz_type_kpi_rstbatch) { sMailTitle = "[성과관리 - " + Biz_Com_Approval_Info.GetBizTypeName(Biz_Type.biz_type_kpi_rst) + " 건 알림메일]"; } else if (this.IBiz_Type == Biz_Type.biz_type_target_resultbatch) { sMailTitle = "[성과관리 - " + Biz_Com_Approval_Info.GetBizTypeName(Biz_Type.biz_type_target_result) + " 건 알림메일]"; } rtnValue = PageUtility.SendMail(dtMailParam, sC_EMP_MAIL, (isReturn) ? sN_EMP_MAIL : sP_EMP_MAIL, sMailTitle, sFile); } return(rtnValue); }
private void ViewEmp(int empId) { iBtnSave.ImageUrl = "../images/btn/b_002.gif"; EmpInfos emp = new EmpInfos(empId); string en_use_yn = WebUtility.GetConfig("ENCRYPTION_USE_YN").ToUpper(); string encryption_key = WebUtility.GetConfig("ENCRYPTION_KEY").ToUpper(); string emp_email; string emp_cellphone; //WebCommon.SetPositionDutyDropDownList(ddlPositionDuty, false); //WebCommon.SetPositionClassDropDownList(ddlPositionClass, false); //WebCommon.SetPositionGrpDropDownList(ddlPositionGrp, false); //WebCommon.SetPositionRankDropDownList(ddlPositionRank, false); //ddlPositionClass.Items.FindByValue(emp.Position_class_code).Selected = true; //ddlPositionDuty.Items.FindByValue(emp.Position_duty_code).Selected = true; //PageUtility.FindByValueDropDownList(ddlPositionGrp, emp.Position_grp_code); //ddlPositionRank.Items.FindByValue(emp.Position_rank_code).Selected = true; DropDownListCommom.BindPositionClass(ddlPositionClass); DropDownListCommom.BindPositionDuty(ddlPositionDuty); DropDownListCommom.BindPositionGroup(ddlPositionGrp); DropDownListCommom.BindPositionRank(ddlPositionRank); DropDownListCommom.BindPositionKind(ddlPositionKind); WebUtility.FindByValueDropDownList(ddlPositionClass, emp.Position_class_code); WebUtility.FindByValueDropDownList(ddlPositionClass, emp.Position_class_code); WebUtility.FindByValueDropDownList(ddlPositionDuty, emp.Position_duty_code); WebUtility.FindByValueDropDownList(ddlPositionGrp, emp.Position_grp_code); WebUtility.FindByValueDropDownList(ddlPositionRank, emp.Position_rank_code); WebUtility.FindByValueDropDownList(ddlPositionKind, emp.Position_Kind_Code); if (en_use_yn.Equals("Y")) { emp_email = DataTypeUtility.Decrypt(emp.Emp_Email, encryption_key); emp_cellphone = DataTypeUtility.Decrypt(emp.Cell_Phone, encryption_key); } else { emp_email = emp.Emp_Email; emp_cellphone = emp.Cell_Phone; } hfPrevDeptID.Value = emp.Dept_Ref_ID.ToString(); txtDeptID.Text = emp.Dept_Ref_ID.ToString(); txtLoginID.Text = emp.LoginID; txtLoginIP.Text = emp.LoginIP; txtName.Text = emp.Emp_Name; txtDaily.Text = emp.Daily_Phone; txtEmail.Text = emp_email; txtCell.Text = emp_cellphone; txtZipcode1.Text = ((emp.ZipCode == null) || emp.ZipCode.Trim().Equals("")) ? "": emp.ZipCode.Substring(0, 3); txtZipcode2.Text = ((emp.ZipCode == null) || emp.ZipCode.Trim().Equals("")) ? "": emp.ZipCode.Substring(3, 3); //txtZipcode1.Text = (emp.ZipCode.Trim().Equals("")) ? emp.ZipCode.Substring(0, 3) : ""; //txtZipcode2.Text = (!emp.ZipCode.Trim().Equals("")) ? emp.ZipCode.Substring(2, 3) : ""; txtAddr1.Text = emp.Addr_1; txtAddr2.Text = emp.Addr_2; txtDeptName.Text = emp.Dept_Name; if (emp.Position_duty_code == null) { WebUtility.FindByValueDropDownList(ddlPositionClass, "99"); WebUtility.FindByValueDropDownList(ddlPositionDuty, "99"); WebUtility.FindByValueDropDownList(ddlPositionGrp, "99"); WebUtility.FindByValueDropDownList(ddlPositionRank, "99"); } else { //ddlPositionDuty.Items.FindByValue(emp.Position_duty_code).Selected = true; //ddlPositionRank.Items.FindByValue(emp.Position_duty_code).Selected = true; //ddlPositionClass.Items.FindByValue(emp.Position_duty_code).Selected = true; } }
/// <summary> /// IsMandatory /// : 필수값 체크 /// </summary> /// <returns></returns> private bool IsMandatory(out string sErr, bool abEdit) { bool bRet = true; sErr = ""; if (abEdit) { //if (TypeUtility.GetNumString(GetRequest("empid")) == "") if (TypeUtility.GetNumString(empId) == "") { sErr = "alert('수정정보를 정확히 알 수 없습니다.\n\n다시 시도해 주십시요.');"; bRet = false; } } if (GetValue(txtDeptID.Text) == "") { sErr = "alert('[부서]를 알 수 없습니다.');"; bRet = false; } else if (GetValue(txtDeptName.Text) == "") { sErr = "alert('[부서]를 알 수 없습니다.');"; bRet = false; } else if (GetValue(txtLoginID.Text) == "") { sErr = "alert('[사용자아이디]를 알 수 없습니다.');" + "try {eval(document.forms[0]." + txtLoginID.ClientID + ".select());} catch(e){}" + "try {eval(document.forms[0]." + txtLoginID.ClientID + ".select());} catch(e){}"; bRet = false; } else if (GetValue(txtName.Text) == "") { sErr = "alert('[사용자명]을 알 수 없습니다.');" + "try {eval(document.forms[0]." + txtName.ClientID + ".select());} catch(e){}" + "try {eval(document.forms[0]." + txtName.ClientID + ".select());} catch(e){}"; bRet = false; } else if (PageUtility.GetByValueDropDownList(ddlPositionDuty) == "0") { sErr = "alert('[직책]을 선택하십시요.');" + "try {eval(document.forms[0]." + ddlPositionDuty.ClientID + ".select());} catch(e){}" + "try {eval(document.forms[0]." + ddlPositionDuty.ClientID + ".select());} catch(e){}"; bRet = false; } else if (PageUtility.GetByValueDropDownList(ddlPositionRank) == "0") { sErr = "alert('[직위]를 선택하십시요.');" + "try {eval(document.forms[0]." + ddlPositionRank.ClientID + ".select());} catch(e){}" + "try {eval(document.forms[0]." + ddlPositionRank.ClientID + ".select());} catch(e){}"; bRet = false; } else if (PageUtility.GetByValueDropDownList(ddlPositionGrp) == "0") { sErr = "alert('[직군]를 선택하십시요.');" + "try {eval(document.forms[0]." + ddlPositionGrp.ClientID + ".select());} catch(e){}" + "try {eval(document.forms[0]." + ddlPositionGrp.ClientID + ".select());} catch(e){}"; bRet = false; } else if (PageUtility.GetByValueDropDownList(ddlPositionClass) == "0") { sErr = "alert('[직급]을 선택하십시요.');" + "try {eval(document.forms[0]." + ddlPositionClass.ClientID + ".select());} catch(e){}" + "try {eval(document.forms[0]." + ddlPositionClass.ClientID + ".select());} catch(e){}"; bRet = false; } else if (PageUtility.GetByValueDropDownList(ddlPositionKind) == "0") { sErr = "alert('[직종]을 선택하십시요.');" + "try {eval(document.forms[0]." + ddlPositionKind.ClientID + ".select());} catch(e){}" + "try {eval(document.forms[0]." + ddlPositionKind.ClientID + ".select());} catch(e){}"; bRet = false; } // 추가일 경우에는 아이디의 중복확인을 처리한다. if (mode.ToUpper() == "NEW") { EmpInfos emp = new EmpInfos(); if (!emp.CheckLoginID(GetValue(txtLoginID.Text))) { sErr = "alert('입력하신 [사용자아이디]는 이미 존재합니다.');" + "try {eval(document.forms[0]." + txtLoginID.ClientID + ".select());} catch(e){}" + "try {eval(document.forms[0]." + txtLoginID.ClientID + ".select());} catch(e){}"; bRet = false; } } return(bRet); }
private DataSet GetEmpInfoList(string dept_ref_id) { EmpInfos emp = new EmpInfos(); return(emp.GetEmpInfoByDeptID(dept_ref_id)); }
public void SendMailBatch(bool isReturn) { if (PageUtility.GetAppConfig("Mail.UseDraftMailYN") == "N") { return; } string sC_EMP_MAIL = ""; string sP_EMP_MAIL = ""; string sN_EMP_MAIL = ""; string sFile = "Mail_Draft.htm"; EmpInfos objEmp = new EmpInfos(gUserInfo.Emp_Ref_ID); Biz_Com_Approval_Prc objPrc = new Biz_Com_Approval_Prc(); for (int i = 0; i < ugrdDraft.Rows.Count; i++) { int appid, verno; string biztype = string.Empty; if (ugrdDraft.Rows[i].Cells.FromKey("BIZ_TYPE").Value.ToString() == Biz_Type.biz_type_kpi_docbatch) { biztype = Biz_Type.biz_type_kpi_doc; } else if (ugrdDraft.Rows[i].Cells.FromKey("BIZ_TYPE").Value.ToString() == Biz_Type.biz_type_kpi_rstbatch) { biztype = Biz_Type.biz_type_kpi_rst; } else if (ugrdDraft.Rows[i].Cells.FromKey("BIZ_TYPE").Value.ToString() == Biz_Type.biz_type_target_resultbatch) { biztype = Biz_Type.biz_type_target_result; } appid = DataTypeUtility.GetToInt32(ugrdDraft.Rows[i].Cells.FromKey("APP_REF_ID").Value); verno = DataTypeUtility.GetToInt32(ugrdDraft.Rows[i].Cells.FromKey("VERSION_NO").Value); bool bRtn = objPrc.GetSendMailUser(appid, verno, gUserInfo.Emp_Ref_ID, out sC_EMP_MAIL, out sP_EMP_MAIL, out sN_EMP_MAIL); if (!bRtn) { return; } if (isReturn && (!PageUtility.CheckMailAddress(sC_EMP_MAIL) || !PageUtility.CheckMailAddress(sN_EMP_MAIL))) { return; } if (!isReturn && (!PageUtility.CheckMailAddress(sC_EMP_MAIL) || !PageUtility.CheckMailAddress(sP_EMP_MAIL))) { return; } bool rtnValue = false; DataTable dtMailParam = new DataTable("PARAM"); dtMailParam.Columns.Add("KEY", typeof(string)); dtMailParam.Columns.Add("VAL", typeof(string)); Biz_Com_Approval_Info objMst = new Biz_Com_Approval_Info(appid, verno); string strVPath = Request.ApplicationPath; string strSHost = Request.Url.Host; string strSPort = Request.Url.Port.ToString(); string strProto = Request.Url.Scheme; strVPath = (strVPath == "/") ? "" : strVPath; string strFullPath = strProto + "://" + strSHost + ":" + strSPort + strVPath; DataRow dr = null; dr = dtMailParam.NewRow(); dr["KEY"] = "[SITE_URL]"; dr["VAL"] = strFullPath; dtMailParam.Rows.Add(dr); dr = dtMailParam.NewRow(); dr["KEY"] = "[BIZ_TYPE]"; dr["VAL"] = Biz_Com_Approval_Info.GetBizTypeName(biztype); dtMailParam.Rows.Add(dr); dr = dtMailParam.NewRow(); dr["KEY"] = "[APP_CODE]"; dr["VAL"] = objMst.IApp_Code; dtMailParam.Rows.Add(dr); dr = dtMailParam.NewRow(); dr["KEY"] = "[TITLE]"; dr["VAL"] = objMst.ITitle; dtMailParam.Rows.Add(dr); dr = dtMailParam.NewRow(); dr["KEY"] = "[EMP_NAME]"; dr["VAL"] = objEmp.Emp_Name; dtMailParam.Rows.Add(dr); dr = dtMailParam.NewRow(); dr["KEY"] = "[DEPT_NAME]"; dr["VAL"] = objEmp.Dept_Name; dtMailParam.Rows.Add(dr); dr = dtMailParam.NewRow(); dr["KEY"] = "[TRX_DATE]"; dr["VAL"] = objMst.IUpdate_Date.ToShortDateString(); dtMailParam.Rows.Add(dr); dr = dtMailParam.NewRow(); dr["KEY"] = "[TODAY]"; dr["VAL"] = DateTime.Now.ToString(); dtMailParam.Rows.Add(dr); dr = dtMailParam.NewRow(); dr["KEY"] = "[DRAFT_TYPE]"; dr["VAL"] = (isReturn) ? "반려" : "승인요청"; dtMailParam.Rows.Add(dr); string sMailTitle = "[성과관리 - " + Biz_Com_Approval_Info.GetBizTypeName(biztype) + " 건 알림메일]"; bool ismail = PageUtility.SendMail(dtMailParam, sC_EMP_MAIL, (isReturn) ? sN_EMP_MAIL : sP_EMP_MAIL, sMailTitle, sFile); } }
public bool SendMail(bool isReturn) { if (PageUtility.GetAppConfig("Mail.UseDraftMailYN") == "N") { return(true); } string sC_EMP_MAIL = ""; string sP_EMP_MAIL = ""; string sN_EMP_MAIL = ""; string sFile = "Mail_Draft.htm"; EmpInfos objEmp = new EmpInfos(this.IDraftEmpID); Biz_Com_Approval_Prc objPrc = new Biz_Com_Approval_Prc(); bool bRtn = objPrc.GetSendMailUser(this.IApp_Ref_Id, this.IVersion_No, this.IDraftEmpID, out sC_EMP_MAIL, out sP_EMP_MAIL, out sN_EMP_MAIL); if (!bRtn) { return(false); } if (isReturn && (!PageUtility.CheckMailAddress(sC_EMP_MAIL) || !PageUtility.CheckMailAddress(sN_EMP_MAIL))) { return(false); } if (!isReturn && (!PageUtility.CheckMailAddress(sC_EMP_MAIL) || !PageUtility.CheckMailAddress(sP_EMP_MAIL))) { return(false); } DataTable dtMailParam = new DataTable("PARAM"); dtMailParam.Columns.Add("KEY", typeof(string)); dtMailParam.Columns.Add("VAL", typeof(string)); Biz_Com_Approval_Info objMst = new Biz_Com_Approval_Info(this.IApp_Ref_Id, this.IVersion_No); string strVPath = Request.ApplicationPath; string strSHost = Request.Url.Host; string strSPort = Request.Url.Port.ToString(); string strProto = Request.Url.Scheme; strVPath = (strVPath == "/") ? "" : strVPath; string strFullPath = strProto + "://" + strSHost + ":" + strSPort + strVPath; DataRow dr = null; dr = dtMailParam.NewRow(); dr["KEY"] = "[SITE_URL]"; dr["VAL"] = strFullPath; dtMailParam.Rows.Add(dr); dr = dtMailParam.NewRow(); dr["KEY"] = "[BIZ_TYPE]"; dr["VAL"] = Biz_Com_Approval_Info.GetBizTypeName(this.IBiz_Type); dtMailParam.Rows.Add(dr); dr = dtMailParam.NewRow(); dr["KEY"] = "[APP_CODE]"; dr["VAL"] = objMst.IApp_Code; dtMailParam.Rows.Add(dr); dr = dtMailParam.NewRow(); dr["KEY"] = "[TITLE]"; dr["VAL"] = objMst.ITitle; dtMailParam.Rows.Add(dr); dr = dtMailParam.NewRow(); dr["KEY"] = "[EMP_NAME]"; dr["VAL"] = objEmp.Emp_Name; dtMailParam.Rows.Add(dr); dr = dtMailParam.NewRow(); dr["KEY"] = "[DEPT_NAME]"; dr["VAL"] = objEmp.Dept_Name; dtMailParam.Rows.Add(dr); dr = dtMailParam.NewRow(); dr["KEY"] = "[TRX_DATE]"; dr["VAL"] = objMst.IUpdate_Date.ToShortDateString(); dtMailParam.Rows.Add(dr); dr = dtMailParam.NewRow(); dr["KEY"] = "[TODAY]"; dr["VAL"] = DateTime.Now.ToString(); dtMailParam.Rows.Add(dr); dr = dtMailParam.NewRow(); dr["KEY"] = "[DRAFT_TYPE]"; dr["VAL"] = (isReturn) ? "반려" : "승인요청"; dtMailParam.Rows.Add(dr); string sMailTitle = "[성과관리 - " + Biz_Com_Approval_Info.GetBizTypeName(this.IBiz_Type) + " 건 알림메일]"; return(PageUtility.SendMail(dtMailParam, sC_EMP_MAIL, (isReturn) ? sN_EMP_MAIL : sP_EMP_MAIL, sMailTitle, sFile)); }
public void SendMail() { if (this.ugrdAppLine.Rows.Count < 1) { this.ClientScript.RegisterClientScriptBlock(typeof(string), "1", JSHelper.GetAlertScript("수신인을 선택해 주십시오.", false)); } //string sFile = "Mail_Draft.htm"; EmpInfos objEmp = new EmpInfos(EMP_REF_ID); //DataTable dtMailParam = new DataTable("PARAM"); //dtMailParam.Columns.Add("KEY", typeof(string)); //dtMailParam.Columns.Add("VAL", typeof(string)); //string strVPath = Request.ApplicationPath; //string strSHost = Request.Url.Host; //string strSPort = Request.Url.Port.ToString(); //string strProto = Request.Url.Scheme; //strVPath = (strVPath == "/") ? "" : strVPath; //string strFullPath = strProto + "://" + strSHost + ":" + strSPort + strVPath; //DataRow dr = null; //dr = dtMailParam.NewRow(); //dr["KEY"] = "[SITE_URL]"; //dr["VAL"] = strFullPath; //dtMailParam.Rows.Add(dr); //dr = dtMailParam.NewRow(); //dr["KEY"] = "[BIZ_TYPE]"; //dr["VAL"] = Biz_Type.biz_type_prm_doc_name; //dtMailParam.Rows.Add(dr); //dr = dtMailParam.NewRow(); //dr["KEY"] = "[APP_CODE]"; //dr["VAL"] = "-"; //dtMailParam.Rows.Add(dr); //dr = dtMailParam.NewRow(); //dr["KEY"] = "[TITLE]"; //dr["VAL"] = this.ITitle; //dtMailParam.Rows.Add(dr); //dr = dtMailParam.NewRow(); //dr["KEY"] = "[EMP_NAME]"; //dr["VAL"] = objEmp.Emp_Name; //dtMailParam.Rows.Add(dr); //dr = dtMailParam.NewRow(); //dr["KEY"] = "[DEPT_NAME]"; //dr["VAL"] = objEmp.Dept_Name; //dtMailParam.Rows.Add(dr); //dr = dtMailParam.NewRow(); //dr["KEY"] = "[TRX_DATE]"; //dr["VAL"] = DateTime.Now.Year.ToString() + "-" + DateTime.Now.Month.ToString().PadLeft(2, '0') + "-" + DateTime.Now.Day.ToString().PadLeft(2, '0'); //dtMailParam.Rows.Add(dr); //dr = dtMailParam.NewRow(); //dr["KEY"] = "[TODAY]"; //dr["VAL"] = DateTime.Now.ToString(); //dtMailParam.Rows.Add(dr); //dr = dtMailParam.NewRow(); //dr["KEY"] = "[DRAFT_TYPE]"; //dr["VAL"] = "사업관리진행 확인"; //dtMailParam.Rows.Add(dr); //string sMailTitle = "[성과관리 - 사업관리진행건 알림메일]"; //string sContent = PageUtility.GetMailContent(sFile, dtMailParam); //txtTitle.Text = sMailTitle; //wheMail.Text = sContent; string sEmail = ""; int iRow = ugrdAppLine.Rows.Count; for (int i = 0; i < iRow; i++) { sEmail = ugrdAppLine.Rows[i].Cells.FromKey("EMP_EMail").Value.ToString(); PageUtility.SendMail(txtTitle.Text, wheMail.Text, objEmp.Emp_Email, sEmail); } this.ClientScript.RegisterClientScriptBlock(typeof(string), "1", JSHelper.GetAlertScript("발송되었습니다.", true)); }
protected void ibtnMail_Click(object sender, ImageClickEventArgs e) { bool rtnMail = false; string sC_EMP_MAIL = ""; string sN_EMP_MAIL = ""; string sFile = ""; string sMailTitle = ""; EmpInfos objEmp; if (this.hdfEstID.Value == null) { ltrScript.Text = JSHelper.GetAlertScript("평가유형을 선택하세요!"); return; } if (this.hdfEstID.Value.ToString() == "") { ltrScript.Text = JSHelper.GetAlertScript("평가유형을 선택하세요!"); return; } string strVPath = Request.ApplicationPath; string strSHost = Request.Url.Host; string strSPort = Request.Url.Port.ToString(); string strProto = Request.Url.Scheme; strVPath = (strVPath == "/") ? "" : strVPath; string strFullPath = strProto + "://" + strSHost + ":" + strSPort + strVPath; DataTable dtMailParam = new DataTable("PARAM"); dtMailParam.Columns.Add("KEY", typeof(string)); dtMailParam.Columns.Add("VAL", typeof(string)); DataRow dr = null; dr = dtMailParam.NewRow(); dr["KEY"] = "[::MAIL_DOMAIN::]"; dr["VAL"] = strFullPath; dtMailParam.Rows.Add(dr); switch (hdfEstID.Value.ToString()) { case "3GA": sFile = "mailtemp_보고서작성.htm"; sMailTitle = "[성과관리 - " + "MBO평가 종합보고서 작성요청 건 알림메일]"; dr = dtMailParam.NewRow(); dr["KEY"] = "[::APP_GUBUN::]"; dr["VAL"] = "MBO"; dtMailParam.Rows.Add(dr); dr = dtMailParam.NewRow(); dr["KEY"] = "[::TO_DAY::]"; dr["VAL"] = DateTime.Now.ToString(); dtMailParam.Rows.Add(dr); break; default: ltrScript.Text = JSHelper.GetAlertScript("평가유형을 선택하세요!"); return; break; } Biz_Datas bizData = new Biz_Datas(); DataSet dsData = bizData.GetEstData(COMP_ID, hdfEstID.Value.ToString(), ESTTERM_REF_ID, ESTTERM_SUB_ID, 0, 0, 0, 0, 0); if (dsData.Tables[0].Rows.Count == 0) { ltrScript.Text = JSHelper.GetAlertScript("메일을 발송할 평가대상자가 없습니다!"); return; } DataTable dtDistinct = dsData.Tables[0].DefaultView.ToTable(true, "TGT_EMP_ID"); sC_EMP_MAIL = PageUtility.GetAppConfig("Mail.From"); int totalReceiver = dtDistinct.Rows.Count; int sendReceiver = 0; foreach (DataRow drReceiver in dtDistinct.Rows) { objEmp = new EmpInfos(DataTypeUtility.GetToInt32(drReceiver["TGT_EMP_ID"])); sN_EMP_MAIL = objEmp.Emp_Email; if (!PageUtility.CheckMailAddress(sC_EMP_MAIL) || !PageUtility.CheckMailAddress(sN_EMP_MAIL)) { return; } rtnMail = PageUtility.SendMail(dtMailParam, sC_EMP_MAIL, sN_EMP_MAIL, sMailTitle, sFile); if (rtnMail) { sendReceiver++; } } ltrScript.Text = JSHelper.GetAlertScript("대상자 " + totalReceiver.ToString() + "명 중 " + sendReceiver.ToString() + "명에게 안내메일을 발송하였습니다."); }