Ejemplo n.º 1
0
    public void SetApprovalList()
    {
        Biz_Com_Approval_Prc objApp = new Biz_Com_Approval_Prc();

        DateTime dtSDate = (DateTime)wdcSDate.Value;
        DateTime dtEDate = (DateTime)wdcEDate.Value;

        string sSDate = dtSDate.Year.ToString() + "-" + dtSDate.Month.ToString().PadLeft(2, '0') + "-" + dtSDate.Day.ToString().PadLeft(2, '0') + " 00:00:00";
        string sEDate = dtEDate.Year.ToString() + "-" + dtEDate.Month.ToString().PadLeft(2, '0') + "-" + dtEDate.Day.ToString().PadLeft(2, '0') + " 23:59:59";

        DataSet rDs = objApp.GetCompletedList
                          (gUserInfo.Emp_Ref_ID
                          , PageUtility.GetByValueDropDownList(ddlApprovalStatus)
                          , PageUtility.GetByValueDropDownList(ddlBizType)
                          , txtTitle.Text
                          , Convert.ToDateTime(sSDate)
                          , Convert.ToDateTime(sEDate));

        ugrdAppList.Clear();
        ugrdAppPrc.Clear();

        if (rDs.Tables.Count > 0)
        {
            ugrdAppList.DataSource = rDs.Tables[0].DefaultView;
            ugrdAppList.DataBind();
            lblCountRow.Text = "Total Rows : " + rDs.Tables[0].Rows.Count.ToString();
        }
        else
        {
            lblCountRow.Text = "Total Rows : 0";
        }
    }
Ejemplo n.º 2
0
    /// <summary>
    /// 반려
    /// </summary>
    public void SetReturn()
    {
        if (this.IApp_Ref_Id > 0 && this.IVersion_No > 0 && this.ILine_Step > 0)
        {
            DataTable dtAppLine = new DataTable("APP_LINE");
            dtAppLine.Columns.Add("APP_REF_ID", typeof(decimal));
            dtAppLine.Columns.Add("VERSION_NO", typeof(int));
            dtAppLine.Columns.Add("LINE_STEP", typeof(int));
            dtAppLine.Columns.Add("RETURN_REASON", typeof(string));
            dtAppLine.Columns.Add("APP_EMP_ID", typeof(int));

            DataRow drAppLine = dtAppLine.NewRow();
            drAppLine["APP_REF_ID"]    = this.IApp_Ref_Id;
            drAppLine["VERSION_NO"]    = this.IVersion_No;
            drAppLine["LINE_STEP"]     = this.ILine_Step;
            drAppLine["RETURN_REASON"] = txtRtnReason.Text;
            drAppLine["APP_EMP_ID"]    = gUserInfo.Emp_Ref_ID;

            dtAppLine.Rows.Add(drAppLine);

            Biz_Com_Approval_Prc objPrc = new Biz_Com_Approval_Prc();
            int iRtn = objPrc.Return(dtAppLine);

            ltrScript.Text = JSHelper.GetAlertOpenerControlCallBackScript(objPrc.Transaction_Message, this.IAPP_CCB, true);
            return;
        }
        else
        {
            this.ltrScript.Text = JSHelper.GetAlertScript("결재문서정보가 올바르지 않습니다.", false);
        }
    }
Ejemplo n.º 3
0
    public void SetApprovalList()
    {
        Biz_Com_Approval_Prc objApp = new Biz_Com_Approval_Prc();

        string sSDate = base.GetYMDFromDateTime((DateTime)wdcSDate.Value, "-") + " 00:00:00";
        string sEDate = base.GetYMDFromDateTime((DateTime)wdcEDate.Value, "-") + " 23:59:59";

        DateTime dtSDate = Convert.ToDateTime(sSDate);
        DateTime dtEDate = Convert.ToDateTime(sEDate);

        DataSet rDs = objApp.GetToDraftList(gUserInfo.Emp_Ref_ID, PageUtility.GetByValueDropDownList(ddlBizType), PageUtility.GetIntByValueDropDownList(ddlComDept), dtSDate, dtEDate);

        ugrdAppList.Clear();
        ugrdAppPrc.Clear();

        if (rDs.Tables.Count > 0)
        {
            ugrdAppList.DataSource = rDs.Tables[0].DefaultView;
            ugrdAppList.DataBind();
            lblRowCount.Text = rDs.Tables[0].Rows.Count.ToString();
        }
        else
        {
            lblRowCount.Text = "0";
        }
    }
Ejemplo n.º 4
0
    public void SetAppDetailList()
    {
        Biz_Com_Approval_Prc objPrc = new Biz_Com_Approval_Prc();
        DataSet rDs = objPrc.GetAllList(this.IApp_Ref_Id, this.IVersion_No);

        ugrdAppPrc.Clear();
        ugrdAppPrc.DataSource = rDs;
        ugrdAppPrc.DataBind();
    }
Ejemplo n.º 5
0
    /// <summary>
    /// 실적마감율 세팅, 결재할 문서, 커뮤니케이션 문서 존재하는지여부
    /// 공지사항 존재여부
    /// </summary>
    private void SetGlobalStatus()
    {
        MicroBSC.Estimation.Dac.TermInfos    objTermYY = new MicroBSC.Estimation.Dac.TermInfos();
        MicroBSC.BSC.Biz.Biz_Bsc_Term_Detail objTerm   = new MicroBSC.BSC.Biz.Biz_Bsc_Term_Detail();

        int    intEstTerm = objTermYY.GetOpenEstTermID();
        string sFinishMon = objTerm.GetReleasedMonth();

        lblFinishMonth.Text = sFinishMon.Substring(0, 4) + "/" + sFinishMon.Substring(4, 2);

        //실적마감율 세팅
        Biz_lib_MenuControl biz = new Biz_lib_MenuControl();

        lblFinishRate.Text = biz.GetFinishRate(intEstTerm, sFinishMon).ToString();

        // 커뮤니케이션 리스트가 있는지?
        Biz_Bsc_Communication_User objUser = new Biz_Bsc_Communication_User();

        iBtnCommunication.Src = (objUser.GetIsNewListPerUser(this.ILogInUserId)) ? "~/images/NHIT/btn_top_02.gif" : "~/images/NHIT/btn_top_02.gif";//있음:없음

        // 결재할 문서가 있는지?
        //Biz_Bsc_Kpi_Result objBSC = new Biz_Bsc_Kpi_Result();
        //iBtnConfirm.Src = (objBSC.GetIsNewDraftPerUser(intEstTerm, sFinishMon, this.ILogInUserId)) ? "~/images/btn/top_bu_k01_b.gif" : "~/images/btn/top_bu_k01.gif";
        Biz_Com_Approval_Prc objBSC = new Biz_Com_Approval_Prc();
        DataSet rDs = objBSC.GetToDraftList(this.ILogInUserId, "");

        if (rDs.Tables.Count > 0)
        {
            iBtnConfirm.Src = (rDs.Tables[0].Rows.Count > 0) ? "~/images/NHIT/btn_top_01.gif" : "~/images/NHIT/btn_top_01.gif";//있음:없음
        }
        else
        {
            iBtnConfirm.Src = "~/images/NHIT/btn_top_01.gif";
        }


        // 공지사항이 있는지 또는 읽었는지
        Biz_Bsc_Communication_Notice objNot = new Biz_Bsc_Communication_Notice();

        this.IisHaveNoticeYN = (objNot.GetCurrentNotice() ? "Y" : "N");

        string strCookieKey = "NOTICE_" + objNot.Inotice_ref_id.ToString();

        if (Request.Cookies[strCookieKey] != null)
        {
            DateTime dtCookieDate = Convert.ToDateTime(Server.HtmlEncode(Request.Cookies[strCookieKey].Expires.ToShortTimeString()));
            if (dtCookieDate < DateTime.Now)
            {
                this.IisHaveNoticeYN = "N";
            }
        }

        // 회사 이미지로고 세팅
        tblTopMenu.Style.Add(HtmlTextWriterStyle.BackgroundImage, ConfigurationManager.AppSettings["TopMenuLogo.ImageUrl"].ToString());
        imgBottomCopy.ImageUrl = ConfigurationManager.AppSettings["BottomPageCopy.ImageUrl"].ToString();
    }
Ejemplo n.º 6
0
    private void RequestModifyDraft()
    {
        Biz_Com_Approval_Prc objApp = new Biz_Com_Approval_Prc();
        bool blnRtn = objApp.RequestModifyDraft(DataTypeUtility.GetToInt32(this.IAPP_REF_ID), EMP_REF_ID);

        if (blnRtn)
        {
            DoBinding();
        }
        else
        {
            ltrScript.Text = JSHelper.GetAlertScript(objApp.Transaction_Message, false);
        }
    }
Ejemplo n.º 7
0
    /// <summary>
    /// 수정결재요청
    /// </summary>
    private void RequestModifyDraft()
    {
        Biz_Com_Approval_Prc objApp = new Biz_Com_Approval_Prc();
        bool blnRtn = objApp.RequestModifyDraft(this.IApp_Ref_Id, gUserInfo.Emp_Ref_ID);

        if (blnRtn)
        {
            this.SetDraftInfo();
            this.SetButton();
        }
        else
        {
            ltrScript.Text = JSHelper.GetAlertScript(objApp.Transaction_Message, false);
        }
    }
Ejemplo n.º 8
0
    /// <summary>
    /// 진행중인결재선 조회
    /// </summary>
    public void SetApprovalLine()
    {
        Biz_Com_Approval_Prc objApp = new Biz_Com_Approval_Prc();
        DataSet rDs = objApp.GetAllList(this.IApp_Ref_Id, this.IVersion_No);

        ugrdAppLine.Clear();

        if (rDs.Tables.Count > 0)
        {
            rDs.Tables[0].DefaultView.Sort = "LINE_STEP ASC";
            ugrdAppLine.DataSource         = rDs.Tables[0].DefaultView;
            ugrdAppLine.DataBind();
        }
        else
        {
            this.SetDraftLine();
        }
    }
Ejemplo n.º 9
0
    protected void ibtnDraft_Click(object sender, ImageClickEventArgs e)
    {
        DataTable dtAppLine = new DataTable("APP_LINE");

        dtAppLine.Columns.Add("APP_REF_ID", typeof(decimal));
        dtAppLine.Columns.Add("VERSION_NO", typeof(int));
        dtAppLine.Columns.Add("LINE_STEP", typeof(int));
        dtAppLine.Columns.Add("APP_EMP_ID", typeof(int));
        dtAppLine.Columns.Add("COMMENTS", typeof(string));

        for (int i = 0; i < ugrdDraft.Rows.Count; i++)
        {
            if (DataTypeUtility.GetToInt32(ugrdDraft.Rows[i].Cells.FromKey("APP_REF_ID").Value) < 1 ||
                DataTypeUtility.GetToInt32(ugrdDraft.Rows[i].Cells.FromKey("VERSION_NO").Value) < 1 ||
                DataTypeUtility.GetToInt32(ugrdDraft.Rows[i].Cells.FromKey("LINE_STEP").Value) < 1)
            {
                this.ltrScript.Text = JSHelper.GetAlertScript("결재문서정보가 올바르지 않습니다.", false);
                return;
            }

            DataRow drAppLine = dtAppLine.NewRow();
            drAppLine["APP_REF_ID"] = DataTypeUtility.GetToInt32(ugrdDraft.Rows[i].Cells.FromKey("APP_REF_ID").Value);
            drAppLine["VERSION_NO"] = DataTypeUtility.GetToInt32(ugrdDraft.Rows[i].Cells.FromKey("VERSION_NO").Value);
            drAppLine["LINE_STEP"]  = DataTypeUtility.GetToInt32(ugrdDraft.Rows[i].Cells.FromKey("LINE_STEP").Value);
            drAppLine["APP_EMP_ID"] = this.IDraftEmpID;
            drAppLine["COMMENTS"]   = txtAppOpinion.Text.Trim();

            dtAppLine.Rows.Add(drAppLine);
        }

        Biz_Com_Approval_Prc objPrc = new Biz_Com_Approval_Prc();
        int iRtn = objPrc.Approval(dtAppLine);

        if (iRtn > 0)
        {
            SendMailBatch(false);
        }

        ltrScript.Text = JSHelper.GetAlertOpenerControlCallBackScript(objPrc.Transaction_Message, this.ICCB1, true);
        return;
    }
Ejemplo n.º 10
0
    /// <summary>
    /// 승인
    /// </summary>
    public void SetApproval()
    {
        if (this.IApp_Ref_Id > 0 && this.IVersion_No > 0 && this.ILine_Step > 0)
        {
            DataTable dtAppLine = new DataTable("APP_LINE");
            dtAppLine.Columns.Add("APP_REF_ID", typeof(decimal));
            dtAppLine.Columns.Add("VERSION_NO", typeof(int));
            dtAppLine.Columns.Add("LINE_STEP", typeof(int));
            dtAppLine.Columns.Add("APP_EMP_ID", typeof(int));
            dtAppLine.Columns.Add("COMMENTS", typeof(string));

            DataRow drAppLine = dtAppLine.NewRow();
            drAppLine["APP_REF_ID"] = this.IApp_Ref_Id;
            drAppLine["VERSION_NO"] = this.IVersion_No;
            drAppLine["LINE_STEP"]  = this.ILine_Step;
            drAppLine["APP_EMP_ID"] = this.IDraftEmpID;
            drAppLine["COMMENTS"]   = txtAppOpinion.Text;

            dtAppLine.Rows.Add(drAppLine);

            Biz_Com_Approval_Prc objPrc = new Biz_Com_Approval_Prc();
            int iRtn = objPrc.Approval(dtAppLine);

            if (objPrc.Transaction_Result == "Y")
            {
                bool bRtn = SendMail(false);
            }

            ltrScript.Text = JSHelper.GetAlertOpenerControlCallBackScript(objPrc.Transaction_Message, this.IAPP_CCB, true);
            return;
        }
        else
        {
            this.ltrScript.Text = JSHelper.GetAlertScript("결재문서정보가 올바르지 않습니다.", false);
        }
    }
Ejemplo n.º 11
0
    public void SetRecallDraft()
    {
        DataTable dtDraft = new DataTable("RECALL_LIST");

        dtDraft.Columns.Add("APP_REF_ID", typeof(int));
        dtDraft.Columns.Add("VERSION_NO", typeof(int));

        DataRow         drDraft = null;
        int             iRow    = ugrdAppList.Rows.Count;
        int             iCol    = ugrdAppList.Columns.Count;
        TemplatedColumn cCol    = (TemplatedColumn)ugrdAppList.Columns.FromKey("selchk");
        CheckBox        chkSel  = null;

        for (int i = 0; i < iRow; i++)
        {
            chkSel = (CheckBox)((CellItem)cCol.CellItems[ugrdAppList.Rows[i].BandIndex]).FindControl("cBox");
            if (chkSel.Checked)
            {
                drDraft = dtDraft.NewRow();
                drDraft["APP_REF_ID"] = int.Parse(ugrdAppList.Rows[i].Cells.FromKey("APP_REF_ID").Value.ToString());
                drDraft["VERSION_NO"] = int.Parse(ugrdAppList.Rows[i].Cells.FromKey("VERSION_NO").Value.ToString());
                dtDraft.Rows.Add(drDraft);
            }
        }

        if (dtDraft.Rows.Count > 0)
        {
            Biz_Com_Approval_Prc objPrc = new Biz_Com_Approval_Prc();
            int iRtnRow = objPrc.RecallDraft(null, null, dtDraft, gUserInfo.Emp_Ref_ID);
            ltrScript.Text = JSHelper.GetAlertScript(objPrc.Transaction_Message, false);
        }
        else
        {
            ltrScript.Text = JSHelper.GetAlertScript("선택된 문서가 없습니다.", false);
        }
    }
Ejemplo n.º 12
0
    //결제아이콘표시
    private bool isResult()
    {
        // 결재할 문서가 있는지?
        //Biz_Bsc_Kpi_Result objBSC = new Biz_Bsc_Kpi_Result();
        //iBtnConfirm.Src = (objBSC.GetIsNewDraftPerUser(intEstTerm, sFinishMon, this.ILogInUserId)) ? "~/images/btn/top_bu_k01_b.gif" : "~/images/btn/top_bu_k01.gif";
        Biz_Com_Approval_Prc objBSC = new Biz_Com_Approval_Prc();
        DataSet rDs = objBSC.GetToDraftList(this.ILogInUserId, "");

        if (rDs.Tables.Count > 0)
        {
            if (rDs.Tables[0].Rows.Count > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
        else
        {
            return(false);
        }


        //tmcode 를 가져옵니다.
//        StrategyMapInfos stgMapInfo = new StrategyMapInfos();
//        int tmcode                  = stgMapInfo.GetTMCODE();

//        //해당유저의 부서코드를 가져옵니다.
//        int dept_id = 0;
//        string query = @"
//                SELECT CASE A.DEPT_LEVEL WHEN 4 THEN
//                            (SELECT EST_DEPT_REF_ID
//                                FROM EST_DEPT_INFO
//                                WHERE EST_DEPT_REF_ID = A.UP_EST_DEPT_ID)
//                            ELSE
//                           A.EST_DEPT_REF_ID
//                    END AS EST_DEPT_REF_ID
//                    , UP_EST_DEPT_ID
//                FROM
//                      EST_DEPT_INFO A
//                    , REL_DEPT_EMP B
//                WHERE A.DEPT_REF_ID= B.DEPT_REF_ID
//                AND B.EMP_REF_ID=" + gUserInfo.Emp_Ref_ID.ToString() + @"
//                ORDER BY A.ESTTERM_REF_ID DESC";

//        DataSet ds = gDbAgent.FillDataSet(query, "data0");
//        try
//        {
//            dept_id = int.Parse(ds.Tables[0].Rows[0][0].ToString());
//        }
//        catch
//        {
//            dept_id = 0;
//        }

//        RoleBases rb        = new RoleBases();
//        string sQuery = "";

//        if (Context.User.IsInRole(rb.ROLE_ADMIN))//admin 권한일경우 전부서의 결재를 여부를 가져옴
//        {

//            sQuery = @"
//                    SELECT A.RESULT
//                    FROM   KPI_RESULT A
//	                       ,KPI_INFO B
//                    WHERE A.KPI_REF_ID = B.KPI_REF_ID
//                        AND A.CHECKSTATUS > 0
//                        AND A.CONFIRMSTATUS = 0
//--                    AND A.TMCODE<=" + tmcode.ToString() + @"";
//        }
//        else
//        {
//            sQuery = @"
//                    SELECT A.RESULT
//                    FROM   KPI_RESULT A
//	                       ,KPI_INFO B
//                    WHERE A.KPI_REF_ID=B.KPI_REF_ID
//--                    AND EST_DEPT_ID=" + dept_id.ToString() + @"
//                    AND B.CONFIRM_EMP_ID=" + gUserInfo.Emp_Ref_ID + @"
//                    AND A.CHECKSTATUS>0
//                    AND A.CONFIRMSTATUS=0
//--                    AND A.TMCODE<=" + tmcode.ToString() + @"
//                    ";
//        }

//        ds = gDbAgent.FillDataSet(sQuery, "data0");

//        if (ds.Tables[0].Rows.Count > 0)//결재할것들이 있는지 여부
//        {
//            return true;
//        }
//        else
//        {
//            return false;
//        }
    }
Ejemplo n.º 13
0
    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);
        }
    }
Ejemplo n.º 14
0
    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));
    }
Ejemplo n.º 15
0
    private void InitControlValue()
    {
        string pathAndQuery = HttpContext.Current.Request.Url.PathAndQuery;
        string sUrl         = HttpContext.Current.Request.Url.AbsolutePath;

        // ERRORINFO.ASPX는 쿼리스트링이 고정되지 않은 페이지 이므로 예외처리한다. (해당페이지 권한시 FULL_PATH로 처리되므로 무한루프일수 있다.)
        //if (sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "ERRORINFO.ASPX")
        //    sUrl = HttpContext.Current.Request.Url.PathAndQuery;

        lblEmpName.Text = gUserInfo.Emp_Name;
        tblTopMenu.Style.Add(HtmlTextWriterStyle.BackgroundImage, ConfigurationManager.AppSettings["TopMenuLogo.ImageUrl"].ToString());


        MicroBSC.Estimation.Dac.TermInfos    objTermYY = new MicroBSC.Estimation.Dac.TermInfos();
        MicroBSC.BSC.Biz.Biz_Bsc_Term_Detail objTerm   = new MicroBSC.BSC.Biz.Biz_Bsc_Term_Detail();

        int    intEstTerm = objTermYY.GetOpenEstTermID();
        string sFinishMon = objTerm.GetReleasedMonth();


        #region KPI실적 마감월 셋팅
        lblFinishMonth.Text = sFinishMon.Substring(0, 4) + "/" + sFinishMon.Substring(4, 2);
        #endregion

        #region KPI실적 마감율 셋팅
        Biz_lib_MenuControl biz = new Biz_lib_MenuControl();
        lblFinishRate.Text = biz.GetFinishRate(intEstTerm, sFinishMon).ToString();
        #endregion

        #region 커뮤니케이션 리스트가 있는지?
        MicroBSC.BSC.Biz.Biz_Bsc_Communication_User objUser = new MicroBSC.BSC.Biz.Biz_Bsc_Communication_User();
        iBtnCommunication.Src = (objUser.GetIsNewListPerUser(this.ILogInUserId)) ? "~/images/btn/top_bu_k02_b.gif" : "~/images/btn/top_bu_k02.gif";

        // 결재할 문서가 있는지?
        //Biz_Bsc_Kpi_Result objBSC = new Biz_Bsc_Kpi_Result();
        //iBtnConfirm.Src = (objBSC.GetIsNewDraftPerUser(intEstTerm, sFinishMon, this.ILogInUserId)) ? "~/images/btn/top_bu_k01_b.gif" : "~/images/btn/top_bu_k01.gif";
        Biz_Com_Approval_Prc objBSC = new Biz_Com_Approval_Prc();
        DataSet rDs = objBSC.GetToDraftList(this.ILogInUserId, "");
        if (rDs.Tables.Count > 0)
        {
            iBtnConfirm.Src = (rDs.Tables[0].Rows.Count > 0) ? "~/images/btn/top_bu_k01_b.gif" : "~/images/btn/top_bu_k01.gif";
        }
        else
        {
            iBtnConfirm.Src = "~/images/btn/top_bu_k01.gif";
        }


        // 공지사항이 있는지 또는 읽었는지
        MicroBSC.BSC.Biz.Biz_Bsc_Communication_Notice objNot = new MicroBSC.BSC.Biz.Biz_Bsc_Communication_Notice();
        this.IisHaveNoticeYN = (objNot.GetCurrentNotice() ? "Y" : "N");

        string strCookieKey = "NOTICE_" + objNot.Inotice_ref_id.ToString();
        if (Request.Cookies[strCookieKey] != null)
        {
            DateTime dtCookieDate = Convert.ToDateTime(Server.HtmlEncode(Request.Cookies[strCookieKey].Expires.ToShortTimeString()));
            if (dtCookieDate < DateTime.Now)
            {
                this.IisHaveNoticeYN = "N";
            }
        }

        #endregion

        #region 타이틀 셋팅
        if (sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "EST110104.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "EST110104_01.ASPX")
        {
            lblTitle.Text = biz.GetMenuTitle(pathAndQuery);
        }
        else
        {
            lblTitle.Text = biz.GetMenuTitle(sUrl);
        }

        if (lblTitle.Text.Trim().Equals(""))
        {
            imgTitle.Visible = false;
        }
        #endregion
    }
Ejemplo n.º 16
0
    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);
    }