Exemplo n.º 1
0
    //===================================: 작업수행담당자 조회
    private void SetTaskOwnerGrid()
    {
        Biz_Prj_Task_Owner objTaskOwner = new Biz_Prj_Task_Owner();

        grdTaskOwnerList.DataSource = objTaskOwner.GetAllList(this.IPrjRefID, 0, 0).Tables[0].DefaultView;
        grdTaskOwnerList.DataBind();
    }
Exemplo n.º 2
0
    private void FormDataBind()
    {
        Biz_Prj_Schedule   objSchedule   = new Biz_Prj_Schedule(this.IPrjRefID, this.ITaskRefID);
        Biz_Prj_Info       objInfo       = new Biz_Prj_Info(this.IPrjRefID);
        Biz_Prj_Schedule   objUpSchedule = new Biz_Prj_Schedule(this.IPrjRefID, objSchedule.IUp_Task_Ref_Id);
        Biz_Prj_Task_Owner objTaskOwner  = new Biz_Prj_Task_Owner();
        Biz_Prj_Task_Share objTaskShare  = new Biz_Prj_Task_Share();

        txtPrjName.Text   = objInfo.IPrj_Name;
        txtPrjPeriod.Text = DataTypeUtility.GetToDateTimeText(objInfo.IPlan_Start_Date) + " ~ " + DataTypeUtility.GetToDateTimeText(objInfo.IPlan_End_Date);

        txtTaskCode.Text            = objSchedule.ITask_Code;
        txtTaskName.Text            = objSchedule.ITask_Name;
        txtUpTaskName.Text          = objUpSchedule.ITask_Name;
        hdfUpTaskRefID.Value        = objSchedule.IUp_Task_Ref_Id.ToString();
        this.ITaskWeight            = objSchedule.ITask_Weight;
        wdcSchPlanStartDate.Value   = objSchedule.IPlan_Start_Date;
        wdcSchPlanEndDate.Value     = objSchedule.IPlan_End_Date;
        wdcSchActualStartDate.Value = objSchedule.IActual_Start_Date;
        wdcSchActualEndDate.Value   = objSchedule.IActual_End_Date;


        txtProceedRate.Text = objSchedule.IProceed_Rate.ToString("##0.#0");
        hdfAttachNo.Value   = objSchedule.IAtt_File;
        hdfNodeDepth.Value  = objSchedule.INode_Depth.ToString();
        txtDesction.Text    = objSchedule.IDesction;

        SetUploadFileInfo(hdfAttachNo.Value, ddlFileUpload);

        ugrdTaskOwnerList.Clear();
        //ugrdTaskShareList.Clear();

        ugrdTaskOwnerList.DataSource = objTaskOwner.GetAllList(this.IPrjRefID, 0, this.ITaskRefID);
        ugrdTaskOwnerList.DataBind();

        //ugrdTaskShareList.DataSource = objTaskShare.GetAllList(this.IPrjRefID, this.ITaskRefID, 0);
        //ugrdTaskShareList.DataBind();
    }
Exemplo n.º 3
0
    protected void iBtnUpdate_Click(object sender, ImageClickEventArgs e)
    {
        Biz_Prj_Schedule   objSchedule  = new Biz_Prj_Schedule();
        Biz_Prj_Task_Owner objTaskOwner = new Biz_Prj_Task_Owner();
        Biz_Prj_Task_Share objTaskShare = new Biz_Prj_Task_Share();

        string[,] saAttachInfo = TypeUtility.GetSplit(hdfAttachNo.Value);

        string strAttach = hdfAttachNo.Value;

        if (saAttachInfo.Length / 2 >= 1)
        {
            if (Convert.ToInt32(saAttachInfo[1, 0]) > 0)
            {
                strAttach = saAttachInfo[0, 0];
            }
        }

        objSchedule.IPrj_Ref_Id        = this.IPrjRefID;
        objSchedule.ITask_Ref_Id       = this.ITaskRefID;
        objSchedule.ITask_Code         = txtTaskCode.Text.Trim();
        objSchedule.ITask_Name         = txtTaskName.Text.Trim();
        objSchedule.IUp_Task_Ref_Id    = DataTypeUtility.GetToInt32(hdfUpTaskRefID.Value);
        objSchedule.ITask_Type         = WebUtility.GetByValueDropDownList(ddlTaskType);
        objSchedule.IPlan_Start_Date   = wdcSchPlanStartDate.Value;
        objSchedule.IPlan_End_Date     = wdcSchPlanEndDate.Value;
        objSchedule.IActual_Start_Date = wdcSchActualStartDate.Value;
        objSchedule.IActual_End_Date   = wdcSchActualEndDate.Value;
        objSchedule.IProceed_Rate      = DataTypeUtility.GetToDecimal(txtProceedRate.Text.Trim());
        objSchedule.IAtt_File          = strAttach;
        objSchedule.INode_Depth        = DataTypeUtility.GetToInt32(hdfNodeDepth.Value);
        objSchedule.IComplete_Yn       = "N";
        objSchedule.IIsdelete          = "N";
        objSchedule.IAfter_Task_Ref_Id = -1;
        objSchedule.IDesction          = this.txtDesction.Text.Trim();



        int intRtn = objSchedule.UpdateData(objSchedule.IPrj_Ref_Id
                                            , objSchedule.ITask_Ref_Id
                                            , objSchedule.ITask_Name
                                            , objSchedule.ITask_Type
                                            , this.ITaskWeight
                                            , objSchedule.IUp_Task_Ref_Id
                                            , objSchedule.ITask_Code
                                            , objSchedule.IPlan_Start_Date
                                            , objSchedule.IPlan_End_Date
                                            , objSchedule.IActual_Start_Date
                                            , objSchedule.IActual_End_Date
                                            , objSchedule.IProceed_Rate
                                            , objSchedule.IAtt_File
                                            , objSchedule.IComplete_Yn
                                            , objSchedule.IIsdelete
                                            , objSchedule.INode_Depth
                                            , objSchedule.IAfter_Task_Ref_Id
                                            , objSchedule.IDesction
                                            , gUserInfo.Emp_Ref_ID);


        //작업수행담당자 저장

        foreach (UltraGridRow row in ugrdTaskOwnerList.Rows)
        {
            objTaskOwner.IPrj_Ref_Id  = this.IPrjRefID;
            objTaskOwner.ITask_Ref_Id = this.ITaskRefID;
            objTaskOwner.IEmp_Ref_Id  = DataTypeUtility.GetToInt32(row.Cells.FromKey("EMP_REF_ID").Value);

            if (row.Cells.FromKey("ITYPE").Value.ToString() == "A")
            {
                intRtn += objTaskOwner.InsertData(objTaskOwner.IPrj_Ref_Id
                                                  , objTaskOwner.IEmp_Ref_Id
                                                  , objTaskOwner.ITask_Ref_Id
                                                  , "N"
                                                  , gUserInfo.Emp_Ref_ID);
            }
            else if (row.Cells.FromKey("ITYPE").Value.ToString() == "U")
            {
                intRtn += objTaskOwner.UpdateData(objTaskOwner.IPrj_Ref_Id
                                                  , objTaskOwner.IEmp_Ref_Id
                                                  , objTaskOwner.ITask_Ref_Id
                                                  , "N"
                                                  , gUserInfo.Emp_Ref_ID);
            }
            else if (row.Cells.FromKey("ITYPE").Value.ToString() == "D")
            {
                intRtn += objTaskOwner.DeleteData(objTaskOwner.IPrj_Ref_Id
                                                  , objTaskOwner.IEmp_Ref_Id
                                                  , objTaskOwner.ITask_Ref_Id
                                                  , gUserInfo.Emp_Ref_ID);
            }
        }

        ////일정공유자 저장

        //foreach (UltraGridRow row in ugrdTaskShareList.Rows)
        //{
        //    objTaskShare.IPrj_Ref_Id = this.IPrjRefID;
        //    objTaskShare.ITask_Ref_Id = this.ITaskRefID;
        //    objTaskShare.IEmp_Ref_Id = DataTypeUtility.GetToInt32(row.Cells.FromKey("EMP_REF_ID").Value);

        //    if (row.Cells.FromKey("ITYPE").Value.ToString() == "A")
        //    {
        //        intRtn += objTaskShare.InsertData(objTaskShare.IPrj_Ref_Id
        //              , objTaskShare.ITask_Ref_Id
        //              , objTaskShare.IEmp_Ref_Id
        //              , gUserInfo.Emp_Ref_ID);
        //    }
        //    else if (row.Cells.FromKey("ITYPE").Value.ToString() == "U")
        //    {
        //        intRtn += objTaskShare.UpdateData(objTaskShare.IPrj_Ref_Id
        //                           , objTaskShare.ITask_Ref_Id
        //                           , objTaskShare.IEmp_Ref_Id
        //                           , gUserInfo.Emp_Ref_ID);
        //    }
        //    else if (row.Cells.FromKey("ITYPE").Value.ToString() == "D")
        //    {
        //        intRtn += objTaskShare.DeleteData(objTaskShare.IPrj_Ref_Id
        //            , objTaskShare.ITask_Ref_Id
        //            , objTaskShare.IEmp_Ref_Id
        //            , gUserInfo.Emp_Ref_ID);
        //    }
        //}

        ugrdTaskOwnerList.Clear();
        //ugrdTaskShareList.Clear();

        ugrdTaskOwnerList.DataSource = objTaskOwner.GetAllList(this.IPrjRefID, 0, this.ITaskRefID);
        ugrdTaskOwnerList.DataBind();

        //ugrdTaskShareList.DataSource = objTaskShare.GetAllList(this.IPrjRefID, this.ITaskRefID, 0);
        //ugrdTaskShareList.DataBind();

        if (intRtn > 0)
        {
            ltrScript.Text = JSHelper.GetAlertScript("작업정보가 저장되었습니다.", true);
        }
    }