Beispiel #1
0
    private void Init_theSchedule(Guid versionCode)
    {
        this._DtSchedule.Columns.Add(new DataColumn("NoteID", typeof(string)));
        this._DtSchedule.Columns.Add(new DataColumn("TaskCode", typeof(string)));
        this._DtSchedule.Columns.Add(new DataColumn("TaskName", typeof(string)));
        this._DtSchedule.Columns.Add(new DataColumn("ParentTaskCode", typeof(string)));
        this._DtSchedule.Columns.Add(new DataColumn("Quantity", typeof(string)));
        this._DtSchedule.Columns.Add(new DataColumn("QuantityUnit", typeof(string)));
        this._DtSchedule.Columns.Add(new DataColumn("WorkLayer", typeof(string)));
        this._DtSchedule.Columns.Add(new DataColumn("IsHaveChild", typeof(string)));
        this._DtSchedule.Columns.Add(new DataColumn("SynthPrice", typeof(string)));
        this._DtSchedule.Columns.Add(new DataColumn("Cost", typeof(string)));
        WBSBidTaskCollection wBSBidTaskCollection = new WBSBidTaskCollection();

        wBSBidTaskCollection = this.bta.GetAllBidScheduleList(this.ProjectCode, 1);
        for (int i = 0; i < wBSBidTaskCollection.Count; i++)
        {
            DataRow    dataRow    = this._DtSchedule.NewRow();
            WBSBidTask wBSBidTask = wBSBidTaskCollection[i];
            dataRow["NoteID"]         = wBSBidTask.NoteID;
            dataRow["TaskCode"]       = wBSBidTask.TaskCode;
            dataRow["TaskName"]       = wBSBidTask.TaskName;
            dataRow["Quantity"]       = ((wBSBidTask.Quantity == 0m) ? "" : string.Format("{0:f}", wBSBidTask.Quantity));
            dataRow["QuantityUnit"]   = wBSBidTask.QuantityUnit;
            dataRow["WorkLayer"]      = Convert.ToInt32(wBSBidTask.WorkLayer);
            dataRow["ParentTaskCode"] = wBSBidTask.ParentTaskCode.ToString();
            dataRow["IsHaveChild"]    = ((wBSBidTask.ChildNum > 0) ? "true" : "false");
            dataRow["SynthPrice"]     = wBSBidTask.SynthPrice.ToString();
            dataRow["Cost"]           = wBSBidTask.Cost.ToString();
            this._DtSchedule.Rows.Add(dataRow);
        }
    }
Beispiel #2
0
    private WBSBidTask GetWBSBidTaskFromPage()
    {
        WBSBidTask wBSBidTask = new WBSBidTask();

        wBSBidTask.ProjectCode  = this.ProjectCode;
        wBSBidTask.Quality      = this.TxtQuality.Text;
        wBSBidTask.Quantity     = Convert.ToDecimal((this.TxtQuantity.Text == "") ? "0" : this.TxtQuantity.Text);
        wBSBidTask.Remark       = this.TxtRemark.Text;
        wBSBidTask.Safety       = this.TxtSafety.Text;
        wBSBidTask.TaskCode     = this.TxtTaskCode.Text;
        wBSBidTask.TaskName     = this.TxtTaskName.Text;
        wBSBidTask.QuantityUnit = this.TxtUnit.Text;
        wBSBidTask.WorkDay      = Convert.ToInt32((this.TxtWorkDay.Text == "") ? "0" : this.TxtWorkDay.Text);
        wBSBidTask.EndDate      = ((this.DtxEndDate.Text.Trim() == "") ? DateTime.MinValue : Convert.ToDateTime(this.DtxEndDate.Text));
        wBSBidTask.StartDate    = ((this.DtxStartDate.Text == "") ? DateTime.MinValue : Convert.ToDateTime(this.DtxStartDate.Text));
        wBSBidTask.Pivotal      = this.ChkPivotal.Checked;
        try
        {
            wBSBidTask.TaskState = int.Parse(this.DDLTaskState.SelectedValue);
            wBSBidTask.WorkLayer = int.Parse(this.DDLTaskType.SelectedValue);
        }
        catch
        {
        }
        return(wBSBidTask);
    }
Beispiel #3
0
    public void TaskList_Bind(string flag)
    {
        WBSBidTask singleTask = this.TaskAct.GetSingleTask(this.ProjectCode, this.TaskCode, 1);

        if (singleTask != null)
        {
            this.GetTaskListFromWBSBidTask(singleTask);
        }
        else
        {
            this.DtxEndDate.Text   = DateTime.Now.ToShortDateString();
            this.DtxStartDate.Text = DateTime.Now.ToShortDateString();
        }
        if (flag == "View")
        {
            this.TxtQuality.Enabled   = false;
            this.TxtQuantity.Enabled  = false;
            this.TxtRemark.Enabled    = false;
            this.TxtSafety.Enabled    = false;
            this.TxtTaskCode.Enabled  = false;
            this.TxtTaskName.Enabled  = false;
            this.TxtUnit.Enabled      = false;
            this.TxtWorkDay.Enabled   = false;
            this.DtxEndDate.Enabled   = false;
            this.DtxStartDate.Enabled = false;
            this.ChkPivotal.Enabled   = false;
            this.DDLTaskState.Enabled = false;
            this.DDLTaskType.Enabled  = false;
        }
    }
Beispiel #4
0
    private void Init_theSchedule(Guid versionCode)
    {
        this._DtSchedule.Reset();
        this._DtSchedule.Columns.Add(new DataColumn("NoteID", typeof(string)));
        this._DtSchedule.Columns.Add(new DataColumn("TaskCode", typeof(string)));
        this._DtSchedule.Columns.Add(new DataColumn("TaskName", typeof(string)));
        this._DtSchedule.Columns.Add(new DataColumn("ParentTaskCode", typeof(string)));
        this._DtSchedule.Columns.Add(new DataColumn("WorkLayer", typeof(string)));
        this._DtSchedule.Columns.Add(new DataColumn("IsHaveChild", typeof(string)));
        this._DtSchedule.Columns.Add(new DataColumn("IsHaveServerChild", typeof(string)));
        WBSBidTaskCollection wBSBidTaskCollection = new WBSBidTaskCollection();

        wBSBidTaskCollection = this.bta.GetAllBidScheduleList(this.ProjectCode, 1);
        for (int i = 0; i < wBSBidTaskCollection.Count; i++)
        {
            DataRow    dataRow    = this._DtSchedule.NewRow();
            WBSBidTask wBSBidTask = wBSBidTaskCollection[i];
            dataRow["NoteID"]            = wBSBidTask.NoteID;
            dataRow["TaskCode"]          = wBSBidTask.TaskCode;
            dataRow["TaskName"]          = wBSBidTask.TaskName;
            dataRow["WorkLayer"]         = Convert.ToInt32(wBSBidTask.WorkLayer);
            dataRow["ParentTaskCode"]    = wBSBidTask.ParentTaskCode.ToString();
            dataRow["IsHaveChild"]       = ((wBSBidTask.ChildNum > 0) ? "true" : "false");
            dataRow["IsHaveServerChild"] = "false";
            this._DtSchedule.Rows.Add(dataRow);
        }
    }
Beispiel #5
0
    private WBSBidTask BidTaskInfo()
    {
        WBSBidTask wBSBidTask = new WBSBidTask();

        wBSBidTask.ProjectCode = new Guid(this.hdnProjectCode.Value);
        this.hdnNoteID.Value.Trim();
        this.txtTaskCode.Text = this.txtTaskCode.Text.Trim().PadLeft(3, '0');
        if (this.hdnNoteID.Value.Trim() != "")
        {
            wBSBidTask.NoteID   = (long)Convert.ToInt32(this.hdnNoteID.Value);
            wBSBidTask.TaskCode = this.txtParentCode.Text.Trim() + this.txtTaskCode.Text.Trim();
        }
        else
        {
            wBSBidTask.TaskCode = this.txtParentCode.Text.Trim() + this.txtTaskCode.Text.Trim();
        }
        wBSBidTask.TaskName       = this.txtTaskName.Text;
        wBSBidTask.ParentTaskCode = this.txtParentCode.Text.Trim();
        wBSBidTask.Quantity       = ((this.txtQuantity.Text.Trim() == "") ? 0m : Convert.ToDecimal(this.txtQuantity.Text));
        wBSBidTask.QuantityUnit   = this.txtUnit.Text;
        wBSBidTask.SynthPrice     = ((this.txtUnitPrice.Text.Trim() == "") ? 0m : Convert.ToDecimal(this.txtUnitPrice.Text.Trim()));
        wBSBidTask.WorkLayer      = Convert.ToInt32(this.ddlTaskType.SelectedValue);
        wBSBidTask.StartDate      = Convert.ToDateTime(this.DateStart.Text.Trim());
        wBSBidTask.EndDate        = Convert.ToDateTime(this.DateEnd.Text.Trim());
        wBSBidTask.sumPrice       = wBSBidTask.SynthPrice * wBSBidTask.Quantity;
        wBSBidTask.WbsType        = Convert.ToInt32(this.hdnWbsType.Value);
        wBSBidTask.Remark         = this.HidRemark.Value.ToString();
        return(wBSBidTask);
    }
        public int ContUpdateScheduleAdd(WBSBidTask bid, string ContractCode, string ContRecordID)
        {
            string str2 = (" begin " + " insert into EPM_Con_UpdateTaskList(ContractCode,ParentTaskCode,TaskCode,TaskName,") + " Quantity,QuantityUnit,ChildNum,ProjectCode,WorkLayer,IsValid,Cost,SynthPrice, " + " StartDate,EndDate,Remark,WbsType,ContractUpdateID,ContractPrice)";
            object obj2 = (((((str2 + " values('" + ContractCode + "','" + bid.ParentTaskCode + "','" + bid.TaskCode + "','" + bid.TaskName + "',") + bid.Quantity.ToString() + ",") + "'" + bid.QuantityUnit + "',") + "0,") + "'" + bid.ProjectCode.ToString() + "',") + ((bid.TaskCode.Length / 3)).ToString() + ",";
            string str3 = string.Concat(new object[] { obj2, "1,0,", bid.SynthPrice.ToString(), ",'", bid.StartDate, "','", bid.EndDate, "','", bid.Remark, "','", bid.WbsType.ToString(), "','", ContRecordID, "',", bid.SynthPrice.ToString(), ")" });

            return(publicDbOpClass.ExecSqlString((str3 + " update EPM_Con_UpdateTaskList set ChildNum = ChildNum + 1 where ProjectCode = '" + bid.ProjectCode.ToString() + "' and ContractCode='" + ContractCode + "' and TaskCode = '" + bid.ParentTaskCode + "' and IsValid = 1 and WbsType=" + bid.WbsType.ToString() + " and ContractUpdateID = '" + ContRecordID + "'") + " end "));
        }
Beispiel #7
0
    public int UpdateTaskList()
    {
        WBSBidTask wBSBidTaskFromPage = this.GetWBSBidTaskFromPage();

        if (this.TaskAct.UpdateTaskList(wBSBidTaskFromPage) == 1)
        {
            return(1);
        }
        return(0);
    }
Beispiel #8
0
    private void Init_theSchedule(Guid versionCode)
    {
        this._DtSchedule.Reset();
        this._DtSchedule.Columns.Add(new DataColumn("NoteID", typeof(string)));
        this._DtSchedule.Columns.Add(new DataColumn("TaskCode", typeof(string)));
        this._DtSchedule.Columns.Add(new DataColumn("TaskName", typeof(string)));
        this._DtSchedule.Columns.Add(new DataColumn("ParentTaskCode", typeof(string)));
        this._DtSchedule.Columns.Add(new DataColumn("Quantity", typeof(string)));
        this._DtSchedule.Columns.Add(new DataColumn("QuantityUnit", typeof(string)));
        this._DtSchedule.Columns.Add(new DataColumn("WorkLayer", typeof(string)));
        this._DtSchedule.Columns.Add(new DataColumn("IsHaveChild", typeof(string)));
        this._DtSchedule.Columns.Add(new DataColumn("IsHaveServerChild", typeof(string)));
        this._DtSchedule.Columns.Add(new DataColumn("StartDate", typeof(DateTime)));
        this._DtSchedule.Columns.Add(new DataColumn("EndDate", typeof(DateTime)));
        this._DtSchedule.Columns.Add(new DataColumn("ContractPrice", typeof(decimal)));
        this._DtSchedule.Columns.Add(new DataColumn("GSTotalFee", typeof(decimal)));
        this._DtSchedule.Columns.Add(new DataColumn("IsAlter", typeof(bool)));
        this._DtSchedule.Columns.Add(new DataColumn("Remark", typeof(string)));
        WBSBidTaskCollection wBSBidTaskCollection = new WBSBidTaskCollection();

        wBSBidTaskCollection = this.bta.GetAllBidScheduleList(this.ProjectCode, 1);
        if (wBSBidTaskCollection.Count == 0)
        {
            this.BtnConfirm.Enabled = false;
        }
        for (int i = 0; i < wBSBidTaskCollection.Count; i++)
        {
            DataRow    dataRow    = this._DtSchedule.NewRow();
            WBSBidTask wBSBidTask = wBSBidTaskCollection[i];
            dataRow["NoteID"]            = wBSBidTask.NoteID;
            dataRow["TaskCode"]          = wBSBidTask.TaskCode;
            dataRow["TaskName"]          = wBSBidTask.TaskName;
            dataRow["Quantity"]          = ((wBSBidTask.Quantity == 0m) ? "0.00" : string.Format("{0:f}", wBSBidTask.Quantity));
            dataRow["QuantityUnit"]      = wBSBidTask.QuantityUnit;
            dataRow["WorkLayer"]         = Convert.ToInt32(wBSBidTask.WorkLayer);
            dataRow["ParentTaskCode"]    = wBSBidTask.ParentTaskCode.ToString();
            dataRow["IsHaveChild"]       = ((wBSBidTask.ChildNum > 0) ? "true" : "false");
            dataRow["IsHaveServerChild"] = "false";
            dataRow["StartDate"]         = wBSBidTask.StartDate;
            dataRow["EndDate"]           = wBSBidTask.EndDate;
            dataRow["ContractPrice"]     = wBSBidTask.SynthPrice;
            dataRow["GSTotalFee"]        = wBSBidTask.sumPrice;
            try
            {
                dataRow["IsAlter"] = wBSBidTask.IsAlter;
            }
            catch
            {
                dataRow["IsAlter"] = false;
            }
            dataRow["Remark"] = wBSBidTask.Remark;
            this._DtSchedule.Rows.Add(dataRow);
        }
    }
Beispiel #9
0
        public bool IsDateTime(WBSBidTask wbid)
        {
            bool   flag = false;
            object obj2 = string.Concat(new object[] { "select * from EPM_Task_TaskList where ProjectCode='", wbid.ProjectCode, "' and TaskCode ='", wbid.ParentTaskCode, "'" });

            if (publicDbOpClass.DataTableQuary(string.Concat(new object[] { obj2, "and datediff(dd,StartDate,'", wbid.StartDate, "')>0 and datediff(dd,EndDate,'", wbid.EndDate, "')<0" })).Rows.Count > 0)
            {
                flag = true;
            }
            return(flag);
        }
Beispiel #10
0
        public int ContUpdateScheduleUp(WBSBidTask bid, string ContractCode, string ContRecordID)
        {
            string str = "";

            str = " update EPM_Con_UpdateTaskList ";
            string str2 = str + " set TaskName = '" + bid.TaskName + "',";
            object obj2 = str2 + " Quantity = " + bid.Quantity.ToString() + ",QuantityUnit = '" + bid.QuantityUnit + "',";
            object obj3 = string.Concat(new object[] { obj2, " SynthPrice=", bid.SynthPrice.ToString(), ",StartDate = '", bid.StartDate, "', EndDate='", bid.EndDate, "',Remark = '", bid.Remark, "', " });
            object obj4 = (string.Concat(new object[] { obj3, " WorkLayer = '", bid.WorkLayer, "' " }) + " ,SumPrice=" + bid.sumPrice.ToString()) + " ,ContractPrice=" + bid.SynthPrice.ToString();

            return(publicDbOpClass.ExecSqlString(string.Concat(new object[] { obj4, " where NoteID = ", bid.NoteID, " and IsValid = 1 and ProjectCode = '", bid.ProjectCode, "' and ContractCode='", ContractCode, "' and ContractUpdateID = '", ContRecordID, "' " })));
        }
Beispiel #11
0
        public WBSBidTask GetSingleTask(Guid projectCode, string taskCode, int wbsType)
        {
            WBSBidTask fromDataRow = new WBSBidTask();

            using (DataTable table = publicDbOpClass.DataTableQuary("select * from EPM_Task_TaskList where ProjectCode='" + projectCode.ToString() + "' and TaskCode='" + taskCode + "' and  IsValid = 1 and WbsType=" + wbsType.ToString()))
            {
                if (table.Rows.Count == 1)
                {
                    fromDataRow = this.GetFromDataRow(table.Rows[0]);
                }
            }
            return(fromDataRow);
        }
Beispiel #12
0
    private void Init_theSchedule(Guid versionCode)
    {
        this._DtSchedule.Columns.Add(new DataColumn("TaskCode", typeof(string)));
        this._DtSchedule.Columns.Add(new DataColumn("TaskName", typeof(string)));
        this._DtSchedule.Columns.Add(new DataColumn("ParentTaskCode", typeof(string)));
        this._DtSchedule.Columns.Add(new DataColumn("Quantity", typeof(string)));
        this._DtSchedule.Columns.Add(new DataColumn("QuantityUnit", typeof(string)));
        this._DtSchedule.Columns.Add(new DataColumn("WorkLayer", typeof(string)));
        this._DtSchedule.Columns.Add(new DataColumn("IsHaveChild", typeof(string)));
        this._DtSchedule.Columns.Add(new DataColumn("IsHaveServerChild", typeof(string)));
        this._DtSchedule.Columns.Add(new DataColumn("StartDate", typeof(DateTime)));
        this._DtSchedule.Columns.Add(new DataColumn("EndDate", typeof(DateTime)));
        this._DtSchedule.Columns.Add(new DataColumn("ContractPrice", typeof(string)));
        this._DtSchedule.Columns.Add(new DataColumn("CompleteCount", typeof(string)));
        this._DtSchedule.Columns.Add(new DataColumn("CompleteRate", typeof(string)));
        WBSBidTaskCollection wBSBidTaskCollection = new WBSBidTaskCollection();

        if (this.Type == "N" || this.Type == "S")
        {
            wBSBidTaskCollection = this.bta.GetAllScheduleList(this.Type, this.ProjectCode, this.dtStartDate, this.dtEndDate, this.PageCode, this.Session["yhdm"].ToString(), 1);
        }
        if (this.Type == "T")
        {
            wBSBidTaskCollection = this.bta.GetAllScheduleList(this.ProjectCode, this.TxtTaskCode.Text, this.TxtTaskName.Text, int.Parse(this.DDLProjectType.SelectedValue), this.PageCode, this.Session["yhdm"].ToString(), 1);
        }
        if (this.Type == "P")
        {
            wBSBidTaskCollection = this.bta.GetAllScheduleList(this.ProjectCode, this.PageCode, this.Session["yhdm"].ToString());
        }
        for (int i = 0; i < wBSBidTaskCollection.Count; i++)
        {
            DataRow    dataRow    = this._DtSchedule.NewRow();
            WBSBidTask wBSBidTask = wBSBidTaskCollection[i];
            dataRow["TaskCode"]          = wBSBidTask.TaskCode;
            dataRow["TaskName"]          = wBSBidTask.TaskName;
            dataRow["Quantity"]          = ((wBSBidTask.Quantity == 0m) ? "" : string.Format("{0:F2}", wBSBidTask.Quantity));
            dataRow["QuantityUnit"]      = wBSBidTask.QuantityUnit;
            dataRow["WorkLayer"]         = Convert.ToInt32(wBSBidTask.WorkLayer);
            dataRow["ParentTaskCode"]    = wBSBidTask.ParentTaskCode.ToString();
            dataRow["IsHaveChild"]       = ((wBSBidTask.ChildNum > 0) ? "true" : "false");
            dataRow["IsHaveServerChild"] = "false";
            dataRow["StartDate"]         = wBSBidTask.StartDate;
            dataRow["EndDate"]           = wBSBidTask.EndDate;
            dataRow["CompleteCount"]     = wBSBidTask.CompleteCount.ToString("F2");
            decimal d = Convert.ToDecimal(dataRow["CompleteCount"].ToString());
            dataRow["CompleteRate"] = ((wBSBidTask.Quantity == 0m) ? 0m.ToString("P2") : (d / wBSBidTask.Quantity).ToString("P2"));
            this._DtSchedule.Rows.Add(dataRow);
        }
    }
Beispiel #13
0
        private WBSBidTask GetFromDataRow(DataRow dr)
        {
            WBSBidTask task = new WBSBidTask();

            try
            {
                task.NoteID = Convert.ToInt32(dr["NoteId"]);
            }
            catch (Exception)
            {
            }
            task.ParentTaskCode = dr["ParentTaskCode"].ToString();
            task.TaskCode       = dr["TaskCode"].ToString();
            task.TaskName       = dr["TaskName"].ToString();
            task.Quantity       = (dr["Quantity"] == DBNull.Value) ? 0M : ((decimal)dr["Quantity"]);
            task.QuantityUnit   = dr["QuantityUnit"].ToString();
            task.ChildNum       = (int)dr["ChildNum"];
            task.ProjectCode    = (Guid)dr["ProjectCode"];
            task.WorkLayer      = (int)dr["WorkLayer"];
            task.IsValid        = true;
            task.StartDate      = (DateTime)dr["StartDate"];
            task.EndDate        = (DateTime)dr["EndDate"];
            task.Cost           = (decimal)dr["Cost"];
            task.Safety         = dr["Safety"].ToString();
            task.Quality        = dr["Quality"].ToString();
            task.TaskState      = (dr["TaskState"] == DBNull.Value) ? 0 : Convert.ToInt32(dr["TaskState"]);
            task.Pivotal        = !(dr["Pivotal"] is DBNull) && ((bool)dr["Pivotal"]);
            task.WorkDay        = (dr["WorkDay"] is DBNull) ? 0 : ((int)dr["WorkDay"]);
            task.Remark         = dr["Remark"].ToString();
            try
            {
                task.WbsType = (int)dr["WBSType"];
            }
            catch
            {
            }
            task.CompleteCount = (dr["CompleteCount"] == DBNull.Value) ? 0M : ((decimal)dr["CompleteCount"]);
            return(task);
        }
Beispiel #14
0
 private void GetTaskListFromWBSBidTask(WBSBidTask tk)
 {
     this.TxtQuality.Text    = tk.Quality;
     this.TxtQuantity.Text   = tk.Quantity.ToString();
     this.TxtRemark.Text     = tk.Remark;
     this.TxtSafety.Text     = tk.Safety;
     this.TxtTaskCode.Text   = tk.TaskCode;
     this.TxtTaskName.Text   = tk.TaskName;
     this.TxtUnit.Text       = tk.QuantityUnit;
     this.TxtWorkDay.Text    = tk.WorkDay.ToString();
     this.DtxEndDate.Text    = tk.EndDate.ToShortDateString();
     this.DtxStartDate.Text  = tk.StartDate.ToShortDateString();
     this.ChkPivotal.Checked = tk.Pivotal;
     try
     {
         this.DDLTaskState.SelectedValue = tk.TaskState.ToString();
         this.DDLTaskType.SelectedValue  = tk.WorkLayer.ToString();
     }
     catch
     {
     }
 }
Beispiel #15
0
        public int UpdateTaskList(WBSBidTask tk)
        {
            object obj2      = ("" + " update EPM_Task_TaskList set ") + " TaskName='" + tk.TaskName + "' ,";
            object obj3      = string.Concat(new object[] { obj2, " Quantity='", tk.Quantity, "' ," }) + " QuantityUnit='" + tk.QuantityUnit + "' ,";
            object obj4      = string.Concat(new object[] { obj3, " StartDate='", tk.StartDate, "' ," });
            object obj5      = ((string.Concat(new object[] { obj4, " EndDate='", tk.EndDate, "' ," }) + " Remark='" + tk.Remark + "' ,") + " Safety='" + tk.Safety + "' ,") + " Quality='" + tk.Quality + "' ,";
            object obj6      = string.Concat(new object[] { obj5, " TaskState='", tk.TaskState, "' ," }) + " Pivotal='" + Convert.ToInt32(tk.Pivotal).ToString() + "' ,";
            object obj7      = string.Concat(new object[] { obj6, " WorkDay='", tk.WorkDay, "' " }) + " where ";
            string str2      = string.Concat(new object[] { obj7, " ProjectCode='", tk.ProjectCode, "' and " });
            object obj8      = (str2 + " TaskCode='" + tk.TaskCode + "' and WbsType=" + tk.WbsType.ToString()) + " declare @StartDate datetime,@EndDate datetime " + " select @StartDate = Min(StartDate),@EndDate = Max(EndDate) from EPM_Task_TaskList where ";
            object obj9      = string.Concat(new object[] { obj8, " ProjectCode='", tk.ProjectCode, "' and ParentTaskCode = (select ParentTaskCode from " });
            object obj10     = string.Concat(new object[] { obj9, " EPM_Task_TaskList where ProjectCode = '", tk.ProjectCode, "' and TaskCode='", tk.TaskCode, "' and WbsType=", tk.WbsType.ToString(), ") and WbsType=", tk.WbsType.ToString() }) + " update EPM_Task_TaskList set StartDate = @StartDate,EndDate = @EndDate where ";
            string sqlString = string.Concat(new object[] { obj10, " ProjectCode='", tk.ProjectCode, "' and TaskCode<>'", tk.TaskCode, "' and charindex(TaskCode,'", tk.TaskCode, "')=1 and WbsType=", tk.WbsType.ToString() });

            try
            {
                publicDbOpClass.ExecSqlString(sqlString);
                return(1);
            }
            catch
            {
                return(0);
            }
        }
Beispiel #16
0
 public int TaskBidUP(WBSBidTask wbid)
 {
     return(publicDbOpClass.ExecSqlString(string.Concat(new object[] { " update EPM_Task_TaskList set StartDate='", wbid.StartDate, "',EndDate='", wbid.EndDate, "'" }) + " where NoteID = " + wbid.NoteID));
 }
Beispiel #17
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        string     value      = this.hdnProjectCode.Value;
        string     text       = base.Server.UrlEncode(this.hdnProjectName.Value);
        string     value2     = this.hdnPrjGuid.Value;
        WBSBidTask wBSBidTask = new WBSBidTask();

        wBSBidTask = this.BidTaskInfo();
        if (this.jw != string.Empty)
        {
            if (this.hdnType.Value == "1")
            {
                if (this.bta.IfSaveTaskCode(wBSBidTask.TaskCode.Trim(), new Guid(this.hdnProjectCode.Value), wBSBidTask.WbsType))
                {
                    this.txtTaskCode.Text = "";
                    this.JS.Text          = "alert('任务代码不能重复!');";
                    return;
                }
                if (this.bta.BidScheduleAdd(wBSBidTask) == 1)
                {
                    this.JS.Text = string.Concat(new string[]
                    {
                        "alert('保存成功!');window.parent.InfoList.location.href ='WBSQuery",
                        (wBSBidTask.WbsType == 1) ? "" : "1",
                        ".aspx?pc=",
                        value,
                        "&PrjGuid=",
                        value2,
                        "&pn=",
                        text,
                        "&jw=",
                        this.jw,
                        "';self.location.href='TaskEdit.aspx?jw=",
                        this.jw,
                        "';"
                    });
                    return;
                }
                this.JS.Text = "alert('保存失败!');";
                return;
            }
            else
            {
                if (this.bta.BidScheduleUp(wBSBidTask, "0") == 1)
                {
                    this.JS.Text = string.Concat(new string[]
                    {
                        "alert('保存成功!');window.parent.InfoList.location.href ='WBSQuery",
                        (wBSBidTask.WbsType == 1) ? "" : "1",
                        ".aspx?pc=",
                        value,
                        "&PrjGuid=",
                        value2,
                        "&pn=",
                        text,
                        "&jw=",
                        this.jw,
                        "';self.location.href='TaskEdit.aspx?jw=",
                        this.jw,
                        "';"
                    });
                    return;
                }
                this.JS.Text = "alert('修改错误!');";
                return;
            }
        }
        else
        {
            if (this.bta.BidScheduleUp(wBSBidTask, "1") == 1)
            {
                this.JS.Text = string.Concat(new string[]
                {
                    "alert('变更任务成功!');window.parent.InfoList.location.href ='WBSQuery2.aspx?pc=",
                    value,
                    "&PrjGuid=",
                    value2,
                    "&pn=",
                    text,
                    "';self.location.href='TaskEdit.aspx';"
                });
                return;
            }
            this.JS.Text = "alert('变更任务失败!');";
            return;
        }
    }