Beispiel #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        COMP_ID        = GetRequestByInt("COMP_ID");
        REL_GRP_ID     = GetRequest("REL_GRP_ID");
        EST_ID         = GetRequest("EST_ID");
        ESTTERM_REF_ID = GetRequestByInt("ESTTERM_REF_ID");

        ESTTERM_STEP_ID = BizUtility.GetEstTermStepIDByMergeYN(COMP_ID);

        SENTENCE = BizUtility.GetRelGroupWhereString(COMP_ID
                                                     , EST_ID
                                                     , ESTTERM_REF_ID
                                                     , REL_GRP_ID
                                                     , "TM");

        if (!Page.IsPostBack)
        {
            Biz_EstInfos estInfo = new Biz_EstInfos(COMP_ID, EST_ID);
            OwnerTypeMode = BizUtility.GetOwnerType(estInfo.Owner_Type);

            DropDownListCommom.BindEstTermSubByYearYN(ddlEstTermSubID, COMP_ID, "");

            GridBinding(WebUtility.GetIntByValueDropDownList(ddlEstTermSubID), OwnerTypeMode);
        }

        ESTTERM_SUB_ID = WebUtility.GetIntByValueDropDownList(ddlEstTermSubID);

        ltrScript.Text = "";
    }
Beispiel #2
0
    private DataTable GetRelGroupData(int comp_id, string est_id, int estterm_ref_id)
    {
        Biz_EmpInfos        empInfo      = new Biz_EmpInfos();
        Biz_RelGroupInfos   relGrpInfo   = new Biz_RelGroupInfos();
        Biz_RelGroupTgtMaps relGrpTgtMap = new Biz_RelGroupTgtMaps();
        DataTable           dataTable    = relGrpTgtMap.GetDataTableSchema();
        DataRow             dataRow      = null;
        DataTable           dtRelGrp     = relGrpInfo.GetRelGroupInfo(comp_id, "", est_id, estterm_ref_id).Tables[0];

        foreach (DataRow dataRowRelGrp in dtRelGrp.Rows)
        {
            DataTable dtTgt          = null;
            string    rel_grp_id     = dataRowRelGrp["REL_GRP_ID"].ToString();
            string    where_sentence = "";

            where_sentence = BizUtility.GetRelGroupWhereString(COMP_ID
                                                               , EST_ID
                                                               , ESTTERM_REF_ID
                                                               , rel_grp_id
                                                               , "TM");

            if (OwnerTypeMode == OwnerType.Dept)
            {
                dtTgt = empInfo.GetRelDeptList("WHERE", where_sentence, "TM").Tables[0];
            }
            else if (OwnerTypeMode == OwnerType.Emp_User)
            {
                dtTgt = empInfo.GetRelEmpList("WHERE", where_sentence, "TM").Tables[0];
            }

            foreach (DataRow dataRowTgt in dtTgt.Rows)
            {
                dataRow = dataTable.NewRow();

                dataRow["COMP_ID"]        = comp_id;
                dataRow["REL_GRP_ID"]     = rel_grp_id;
                dataRow["EST_ID"]         = est_id;
                dataRow["ESTTERM_REF_ID"] = estterm_ref_id;
                dataRow["TGT_DEPT_ID"]    = dataRowTgt["TGT_DEPT_ID"];
                dataRow["TGT_EMP_ID"]     = dataRowTgt["TGT_EMP_ID"];
                dataRow["DATE"]           = DateTime.Now;
                dataRow["USER"]           = EMP_REF_ID;

                dataTable.Rows.Add(dataRow);
            }
        }

        return(dataTable);
    }