Пример #1
0
    /// <summary>
    /// 상위전략 리스트
    /// </summary>
    private void SetParentStg()
    {
        MicroBSC.BSC.Biz.Biz_Bsc_Map_Stg_Parent objBSC = new MicroBSC.BSC.Biz.Biz_Bsc_Map_Stg_Parent();
        DataSet dsStg = objBSC.GetParentStgList(this.IEstTermRefID, this.IEstDeptRefID, this.IMapVersionID, int.Parse(this.ITreeSelValue));

        TugrdUpStgList.Clear();
        TugrdUpStgList.DataSource = dsStg;
        TugrdUpStgList.DataBind();

        DataSet dsAllStg = objBSC.GetDeptStgListExceptParentStg(this.IEstTermRefID, this.IEstDeptRefID, this.IMapVersionID, int.Parse(this.ITreeSelValue));

        TugrdStgPerDept.Clear();
        TugrdStgPerDept.DataSource = dsAllStg;
        TugrdStgPerDept.DataBind();
    }
Пример #2
0
        public bool TxrAllBscStgMap(DataTable iDT)
        {
            int intRow    = iDT.Rows.Count;
            int intTxrCnt = 0;

            IDbConnection conn = DbAgentHelper.CreateDbConnection();

            conn.Open();
            IDbTransaction trx = conn.BeginTransaction();

            MicroBSC.BSC.Biz.Biz_Bsc_Map_Stg_Parent objPrt = new Biz_Bsc_Map_Stg_Parent();
            MicroBSC.BSC.Biz.Biz_Bsc_Map_Kpi        objKpi = new Biz_Bsc_Map_Kpi();

            try
            {
                for (int i = 0; i < intRow; i++)
                {
                    if (iDT.Rows[i]["ITYPE"].ToString() == "D")
                    {
                        this.DeleteData(conn
                                        , trx
                                        , int.Parse(iDT.Rows[i]["ESTTERM_REF_ID"].ToString())
                                        , int.Parse(iDT.Rows[i]["EST_DEPT_REF_ID"].ToString())
                                        , int.Parse(iDT.Rows[i]["MAP_VERSION_ID"].ToString())
                                        , int.Parse(iDT.Rows[i]["STG_REF_ID"].ToString())
                                        , int.Parse(iDT.Rows[i]["VIEW_REF_ID"].ToString())
                                        , int.Parse(iDT.Rows[i]["TXR_USER"].ToString())
                                        );
                        objPrt.DeleteAllData
                            (conn
                            , trx
                            , int.Parse(iDT.Rows[i]["ESTTERM_REF_ID"].ToString())
                            , int.Parse(iDT.Rows[i]["EST_DEPT_REF_ID"].ToString())
                            , int.Parse(iDT.Rows[i]["MAP_VERSION_ID"].ToString())
                            , int.Parse(iDT.Rows[i]["STG_REF_ID"].ToString())
                            , int.Parse(iDT.Rows[i]["TXR_USER"].ToString())
                            );
                        objKpi.DeleteKpiPerStgData
                            (conn
                            , trx
                            , int.Parse(iDT.Rows[i]["ESTTERM_REF_ID"].ToString())
                            , int.Parse(iDT.Rows[i]["EST_DEPT_REF_ID"].ToString())
                            , int.Parse(iDT.Rows[i]["MAP_VERSION_ID"].ToString())
                            , int.Parse(iDT.Rows[i]["STG_REF_ID"].ToString())
                            , int.Parse(iDT.Rows[i]["TXR_USER"].ToString())
                            );
                    }
                    else
                    {
                        this.InsertData(conn
                                        , trx
                                        , int.Parse(iDT.Rows[i]["ESTTERM_REF_ID"].ToString())
                                        , int.Parse(iDT.Rows[i]["EST_DEPT_REF_ID"].ToString())
                                        , int.Parse(iDT.Rows[i]["MAP_VERSION_ID"].ToString())
                                        , int.Parse(iDT.Rows[i]["STG_REF_ID"].ToString())
                                        , int.Parse(iDT.Rows[i]["VIEW_REF_ID"].ToString())
                                        , int.Parse(iDT.Rows[i]["SORT_ORDER"].ToString())
                                        , int.Parse(iDT.Rows[i]["TXR_USER"].ToString())
                                        );
                    }
                }

                base.Transaction_Message = "정상적으로 처리되었습니다.";
                base.Transaction_Result  = "Y";
                trx.Commit();
            }
            catch (Exception e)
            {
                base.Transaction_Message = e.Message;
                base.Transaction_Result  = "N";
                trx.Rollback();
                return(false);
            }
            finally
            {
                conn.Close();
            }

            return(true);
        }
Пример #3
0
    /// <summary>
    /// 상위전략 추가/삭제
    /// </summary>
    /// <param name="iType"></param>
    private void AddDelParentStrategy(string iType)
    {
        DataTable rDT1 = new DataTable("BSC_MAP_STG");

        rDT1.Columns.Add("ITYPE", typeof(string));
        rDT1.Columns.Add("ESTTERM_REF_ID", typeof(int));
        rDT1.Columns.Add("EST_DEPT_REF_ID", typeof(int));
        rDT1.Columns.Add("MAP_VERSION_ID", typeof(int));
        rDT1.Columns.Add("STG_REF_ID", typeof(int));
        rDT1.Columns.Add("UP_STG_REF_ID", typeof(int));
        rDT1.Columns.Add("TXR_USER", typeof(int));

        int intRow = (iType == "A") ? TugrdStgPerDept.Rows.Count : TugrdUpStgList.Rows.Count;

        CheckBox chkCheck;
        DataRow  rDR1;
        int      intLogInUser = gUserInfo.Emp_Ref_ID;

        for (int i = 0; i < intRow; i++)
        {
            if (iType == "A")
            {
                TemplatedColumn unit_col = (TemplatedColumn)TugrdStgPerDept.Columns.FromKey("selchk");
                chkCheck = (CheckBox)((CellItem)unit_col.CellItems[TugrdStgPerDept.Rows[i].BandIndex]).FindControl("cBox");
                if (chkCheck.Checked)
                {
                    rDR1 = rDT1.NewRow();

                    rDR1["ITYPE"]           = iType;
                    rDR1["ESTTERM_REF_ID"]  = (TugrdStgPerDept.Rows[i].Cells.FromKey("ESTTERM_REF_ID").Value == null)  ? this.IEstTermRefID : int.Parse(TugrdStgPerDept.Rows[i].Cells.FromKey("ESTTERM_REF_ID").Value.ToString());
                    rDR1["EST_DEPT_REF_ID"] = (TugrdStgPerDept.Rows[i].Cells.FromKey("EST_DEPT_REF_ID").Value == null) ? this.IEstDeptRefID : int.Parse(TugrdStgPerDept.Rows[i].Cells.FromKey("EST_DEPT_REF_ID").Value.ToString());
                    rDR1["MAP_VERSION_ID"]  = (TugrdStgPerDept.Rows[i].Cells.FromKey("MAP_VERSION_ID").Value == null)  ? this.IMapVersionID : int.Parse(TugrdStgPerDept.Rows[i].Cells.FromKey("MAP_VERSION_ID").Value.ToString());
                    rDR1["STG_REF_ID"]      = (TugrdStgPerDept.Rows[i].Cells.FromKey("STG_REF_ID").Value == null)      ? 0                  : int.Parse(TugrdStgPerDept.Rows[i].Cells.FromKey("STG_REF_ID").Value.ToString());
                    rDR1["UP_STG_REF_ID"]   = (TugrdStgPerDept.Rows[i].Cells.FromKey("UP_STG_REF_ID").Value == null)   ? 0                  : int.Parse(TugrdStgPerDept.Rows[i].Cells.FromKey("UP_STG_REF_ID").Value.ToString());
                    rDR1["TXR_USER"]        = intLogInUser;
                    rDT1.Rows.Add(rDR1);
                }
            }
            else if (iType == "D")
            {
                TemplatedColumn unit_col = (TemplatedColumn)TugrdUpStgList.Columns.FromKey("selchk");
                chkCheck = (CheckBox)((CellItem)unit_col.CellItems[TugrdUpStgList.Rows[i].BandIndex]).FindControl("cBox");
                if (chkCheck.Checked)
                {
                    rDR1 = rDT1.NewRow();

                    rDR1["ITYPE"]           = iType;
                    rDR1["ESTTERM_REF_ID"]  = (TugrdUpStgList.Rows[i].Cells.FromKey("ESTTERM_REF_ID").Value == null)  ? this.IEstTermRefID : int.Parse(TugrdUpStgList.Rows[i].Cells.FromKey("ESTTERM_REF_ID").Value.ToString());
                    rDR1["EST_DEPT_REF_ID"] = (TugrdUpStgList.Rows[i].Cells.FromKey("EST_DEPT_REF_ID").Value == null) ? this.IEstDeptRefID : int.Parse(TugrdUpStgList.Rows[i].Cells.FromKey("EST_DEPT_REF_ID").Value.ToString());
                    rDR1["MAP_VERSION_ID"]  = (TugrdUpStgList.Rows[i].Cells.FromKey("MAP_VERSION_ID").Value == null)  ? this.IMapVersionID : int.Parse(TugrdUpStgList.Rows[i].Cells.FromKey("MAP_VERSION_ID").Value.ToString());
                    rDR1["STG_REF_ID"]      = (TugrdUpStgList.Rows[i].Cells.FromKey("STG_REF_ID").Value == null)      ? 0                  : int.Parse(TugrdUpStgList.Rows[i].Cells.FromKey("STG_REF_ID").Value.ToString());
                    rDR1["UP_STG_REF_ID"]   = (TugrdUpStgList.Rows[i].Cells.FromKey("UP_STG_REF_ID").Value == null)   ? 0                  : int.Parse(TugrdUpStgList.Rows[i].Cells.FromKey("UP_STG_REF_ID").Value.ToString());
                    rDR1["TXR_USER"]        = intLogInUser;
                    rDT1.Rows.Add(rDR1);
                }
            }
        }

        if (rDT1.Rows.Count > 0)
        {
            MicroBSC.BSC.Biz.Biz_Bsc_Map_Stg_Parent objSTG = new MicroBSC.BSC.Biz.Biz_Bsc_Map_Stg_Parent();
            bool blnRtn = objSTG.TxrAllBscStgParent(rDT1);

            this.SetParentStg();
            //ltrScript.Text = JSHelper.GetAlertBackScript(objSTG.Transaction_Message);
        }
    }