public void setKpiData() { if (ddlEstTermInfo.Items.Count < 1) { PageUtility.AlertMessage("등록된 평가기간이 없습니다."); return; } Biz_Bsc_Kpi_Prj objBSC = new Biz_Bsc_Kpi_Prj(); int iEstterm_ref_id = WebUtility.GetIntByValueDropDownList(ddlEstTermInfo); string iResult_input_type = WebUtility.GetByValueDropDownList(ddlResultInput); string iKpiGroup_ref_id = WebUtility.GetByValueDropDownList(ddlKpiGroupRefID); string iKpi_code = txtKPICode.Text.Trim(); string iKpi_name = txtKPIName.Text.Trim(); string iChampion_emp_name = txtChamName.Text.Trim(); int iDept_ref_id = (ddlEstDept.SelectedValue.Trim() == "") ? -1 : int.Parse(ddlEstDept.SelectedValue); DataSet ds = objBSC.GetKpiList (iEstterm_ref_id , this.IPrjRefID , iResult_input_type , iKpi_code , iKpi_name , iChampion_emp_name , iDept_ref_id , iKpiGroup_ref_id , gUserInfo.Emp_Ref_ID); ugrdKpiList.Clear(); ugrdKpiList.DataSource = ds; ugrdKpiList.DataBind(); //lblCountRow.Text = "Total Rows : " + ds.Tables[0].Rows.Count.ToString(); }
protected void btnIn_Click(object sender, ImageClickEventArgs e) { string striType = ""; int cntRow = ugrdKpiList.Rows.Count; CheckBox chkCheck; UltraGridRow ugrdRow; TemplatedColumn col_Check = (TemplatedColumn)ugrdKpiList.Bands[0].Columns.FromKey("selchk"); Biz_Bsc_Kpi_Prj objKpiPrj = new Biz_Bsc_Kpi_Prj(); int iRtn = 0; for (int i = 0; i < ugrdKpiList.Rows.Count; i++) { chkCheck = (CheckBox)((CellItem)col_Check.CellItems[ugrdKpiList.Rows[i].BandIndex]).FindControl("cBox"); ugrdRow = ugrdKpiList.Rows[i]; if (chkCheck.Checked) { objKpiPrj.IEstterm_Ref_Id = DataTypeUtility.GetToInt32(ugrdRow.Cells.FromKey("ESTTERM_REF_ID")); objKpiPrj.IKpi_Ref_Id = DataTypeUtility.GetToInt32(ugrdRow.Cells.FromKey("KPI_REF_ID")); objKpiPrj.IPrj_Ref_Id = this.IPrjRefID; if (!objKpiPrj.IsExist(objKpiPrj.IEstterm_Ref_Id, objKpiPrj.IKpi_Ref_Id, objKpiPrj.IPrj_Ref_Id)) { iRtn += objKpiPrj.InsertData(objKpiPrj.IEstterm_Ref_Id, objKpiPrj.IKpi_Ref_Id, objKpiPrj.IPrj_Ref_Id, gUserInfo.Emp_Ref_ID); } } } this.setKpiPrjData(); this.setKpiData(); }
//===================================: KPI연계 조회 private void SetKpiPrjGrid() { Biz_Bsc_Kpi_Prj objKpiPrj = new Biz_Bsc_Kpi_Prj(); objKpiPrj.IEstterm_Ref_Id = base.ESTTERM_REF_ID; objKpiPrj.IKpi_Ref_Id = 0; objKpiPrj.IPrj_Ref_Id = this.IPrjRefID; DataSet ds = objKpiPrj.GetAllList(objKpiPrj.IEstterm_Ref_Id, objKpiPrj.IKpi_Ref_Id, objKpiPrj.IPrj_Ref_Id); grdKpiPrjList.DataSource = ds.Tables[0].DefaultView; grdKpiPrjList.DataBind(); }
private void setKpiPrjData() { Biz_Bsc_Kpi_Prj objKpiPrj = new Biz_Bsc_Kpi_Prj(); objKpiPrj.IEstterm_Ref_Id = WebUtility.GetIntByValueDropDownList(ddlEstTermInfo); objKpiPrj.IKpi_Ref_Id = 0; objKpiPrj.IPrj_Ref_Id = DataTypeUtility.GetToInt32(hdfPrjRefID.Value); DataSet ds = objKpiPrj.GetAllList(objKpiPrj.IEstterm_Ref_Id, objKpiPrj.IKpi_Ref_Id, objKpiPrj.IPrj_Ref_Id); ugrdKpiPrjList.Clear(); ugrdKpiPrjList.DataSource = ds; ugrdKpiPrjList.DataBind(); }
private void CheckBind(UltraWebGrid grid) { int EsttermRefID; int kpiRefID; int prjRefID; foreach (UltraGridRow row in grid.Rows) { EsttermRefID = DataTypeUtility.GetToInt32(row.Cells.FromKey("ESTTERM_REF_ID").Value); kpiRefID = DataTypeUtility.GetToInt32(row.Cells.FromKey("KPI_REF_ID").Value); Biz_Bsc_Kpi_Prj objKpiPrj = new Biz_Bsc_Kpi_Prj(); foreach (UltraGridColumn col in grid.Columns) { try { prjRefID = DataTypeUtility.GetToInt32(col.Header.Column.Key); } catch { prjRefID = 0; } if (prjRefID != 0) { DataTable dt = objKpiPrj.GetOneList(EsttermRefID , kpiRefID , prjRefID).Tables[0]; if (dt.Rows.Count == 0 || dt.Rows.Count > 1) { continue; } else { if (DataTypeUtility.GetToInt32(dt.Rows[0]["KPI_REF_ID"]) == kpiRefID && DataTypeUtility.GetToInt32(dt.Rows[0]["PRJ_REF_ID"]) == prjRefID) { row.Cells.FromKey(col.Header.Column.Key).Value = "<img src='../images/checkbox.gif' border='0' width='15px' height='15px' valign='middle'>"; // row.Cells.FromKey(col.Header.Column.Key).Value = "V"; } } } } } }
public void SetPrjList() { //그리드 컬럼생성 InitializeGrid(ugrdPrjList); ugrdPrjList.DisplayLayout.AllowColSizingDefault = AllowSizing.Free; //컬럼고정 ugrdPrjList.DisplayLayout.UseFixedHeaders = true; ugrdPrjList.Columns.FromKey("DEPT_NAME").Header.Fixed = true; ugrdPrjList.Columns.FromKey("KPI_NAME").Header.Fixed = true; Biz_Bsc_Kpi_Prj objKpiPrj = new Biz_Bsc_Kpi_Prj(); _iestTermInfo = WebUtility.GetIntByValueDropDownList(ddlEstTermInfo); _iestDeptRefID = WebUtility.GetIntByValueDropDownList(ddlEstDept); _iprjType = WebUtility.GetByValueDropDownList(ddlPrjType); _iprjCode = txtPrjCode.Text.Trim(); _iprjName = txtPrjName.Text.Trim(); DataTable rDt = objKpiPrj.GetTotalKpiPrjList(_iestTermInfo , 0 , 0 , _iestDeptRefID , _iprjType , _iprjCode , _iprjName , gUserInfo.Emp_Ref_ID); ugrdPrjList.Clear(); ugrdPrjList.DataSource = rDt; ugrdPrjList.DataBind(); lblRowCount.Text = rDt.Rows.Count.ToString(); if (rDt.Rows.Count > 0) { //지표와프로젝트연결 CheckBind(ugrdPrjList); GridDoLayout(ugrdPrjList); } }