示例#1
0
    protected void ugrdBudgetList_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)
    {
        DataRowView drw = (DataRowView)e.Data;

        Biz_Prj_Execution objExecution = new Biz_Prj_Execution();

        DataSet ds = objExecution.GetTotalSum(this.IPrjRefID, drw["BUDGET_YM"].ToString(), DataTypeUtility.GetToDecimal(drw["MONTHLY_AMOUNT"]));

        if (ds.Tables != null && ds.Tables[0].Rows.Count > 0)
        {
            e.Row.Cells.FromKey("AMOUNT").Value = ds.Tables[0].Rows[0]["AMOUNT"];
            e.Row.Cells.FromKey("RATE").Value   = ds.Tables[0].Rows[0]["RATE"];
        }
    }
示例#2
0
    protected void iBtnUpdate_Click(object sender, ImageClickEventArgs e)
    {
        Biz_Prj_Execution objExecution = new Biz_Prj_Execution();

        //사업비용집행내역

        int intRtn = 0;

        foreach (UltraGridRow row in ugrdPrjList.Rows)
        {
            objExecution.IExec_Ref_Id  = DataTypeUtility.GetToInt32(row.Cells.FromKey("EXEC_REF_ID").Value);
            objExecution.IPrj_Ref_Id   = DataTypeUtility.GetToInt32(row.Cells.FromKey("PRJ_REF_ID").Value);
            objExecution.ITask_Ref_Id  = DataTypeUtility.GetToInt32(row.Cells.FromKey("TASK_REF_ID").Value);
            objExecution.IExec_Date    = row.Cells.FromKey("EXEC_DATE").Value;
            objExecution.IAmount       = DataTypeUtility.GetToDecimal(row.Cells.FromKey("AMOUNT").Value);
            objExecution.IExec_Content = DataTypeUtility.GetValue(row.Cells.FromKey("EXEC_CONTENT").Value);


            if (row.Cells.FromKey("ITYPE").Value.ToString() == "A")
            {
                intRtn += objExecution.InsertData(objExecution.IPrj_Ref_Id
                                                  , objExecution.ITask_Ref_Id
                                                  , objExecution.IExec_Date
                                                  , objExecution.IAmount
                                                  , objExecution.IExec_Content
                                                  , gUserInfo.Emp_Ref_ID);
            }
            else if (row.Cells.FromKey("ITYPE").Value.ToString() == "U")
            {
                intRtn += objExecution.UpdateData(objExecution.IExec_Ref_Id
                                                  , objExecution.IPrj_Ref_Id
                                                  , objExecution.ITask_Ref_Id
                                                  , objExecution.IExec_Date
                                                  , objExecution.IAmount
                                                  , objExecution.IExec_Content
                                                  , gUserInfo.Emp_Ref_ID);
            }
            else if (row.Cells.FromKey("ITYPE").Value.ToString() == "D")
            {
                intRtn += objExecution.DeleteData(objExecution.IExec_Ref_Id, gUserInfo.Emp_Ref_ID);
            }
        }


        if (intRtn > 0)
        {
            this.BeforeSearch();
        }
    }
示例#3
0
    private void BeforeSearch()
    {
        this.IPrjRefID = WebUtility.GetIntByValueDropDownList(ddlPrjName);

        Biz_Prj_Execution objexec = new Biz_Prj_Execution();

        DataSet ds = objexec.GetAllList(this.IPrjRefID);

        ugrdPrjList.Clear();
        this.ugrdPrjList.DataSource = ds;
        this.ugrdPrjList.DataBind();

        lblRowCount.Text = ds.Tables[0].Rows.Count.ToString();


        if (ds.Tables[0].Rows.Count > 0)
        {
            this.ibnDownExcel.Visible = true;
        }
    }