Esempio n. 1
0
    public void bindPagedata(string typecode)
    {
        PrjInfoModel pIM = new PrjInfoModel();

        pIM = PrjInfoAction.GetSingleInfo(typecode.ToString());
        this.TextBind(pIM);
    }
Esempio n. 2
0
    protected void BtnDel_Click(object sender, EventArgs e)
    {
        string value = this.hdnID.Value;

        if (PrjInfoAction.Del(value) == 1)
        {
            this.GridBind(this.ViewState["SQLWHERE"].ToString());
            return;
        }
        this.js.Text = "alert('删除失败!')";
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (base.Request["pc"] == null || base.Request["t"] == null || base.Request["m"] == null)
     {
         this.RegisterStartupScript("错误提示", "<script>alert('参数错误!');</script>");
         return;
     }
     this.ProjectCode = new Guid(base.Request["pc"].ToString());
     this.StartDate   = Convert.ToDateTime(base.Request["m"].ToString());
     base.DealType    = (OpType)Enum.Parse(typeof(OpType), base.Request["t"].ToString());
     if (base.Request["IsExam"] != null)
     {
         this.IsExamine = base.Request["IsExam"].ToString().Trim();
     }
     if (base.DealType == OpType.Other)
     {
         this.BtnSave.Enabled = false;
     }
     if (!this.Page.IsPostBack)
     {
         if (this.intCount == 0)
         {
             this.ProductValueAct.updateProductValueDetail(this.ProjectCode, this.StartDate);
             bool flag = this.ProductValueAct.IsProductValueExamine(this.ProjectCode, this.StartDate);
             if (flag)
             {
                 this.BtnSave.Enabled    = false;
                 this.BtnExamine.Enabled = false;
             }
         }
         this.intCount = 1;
         this.Lb_title.Attributes["align"] = "left";
         this.Lb_title.Text = base.Request["m"].ToString() + "产值计划";
         string projectNameOfCode = PrjInfoAction.GetProjectNameOfCode(this.ProjectCode.ToString());
         if (projectNameOfCode != null)
         {
             this.Lb_title.Text = projectNameOfCode + " " + this.Lb_title.Text;
         }
         else
         {
             this.Lb_title.Text = this.Lb_title.Text;
         }
     }
     this._ScheduleCodeList = this.hdnScheduleCodeList.Value.Split(new char[]
     {
         '^'
     });
     this.Init_theSchedule();
     this.tblScheduleView_Create(true);
     this.BtnExit.Attributes["onclick"] = "javascript:return OpenProduceValue('" + this.ProjectCode + "');";
 }
Esempio n. 4
0
    private void ddlPrjBind(PrjInfoModel PIM)
    {
        string text = PrjInfoAction.GetSqlWhere(PIM);

        text = " Podepom like '%" + this.Session["yhdm"].ToString().Trim() + "%' and " + text;
        DataTable dateList = PrjInfoAction.GetDateList(text);

        if (dateList.Rows.Count > 0)
        {
            this.ddlPrj.DataSource     = dateList;
            this.ddlPrj.DataTextField  = "PrjName";
            this.ddlPrj.DataValueField = "PrjCode";
            this.ddlPrj.DataBind();
        }
    }
Esempio n. 5
0
 protected void btndelAdmin_Click(object sender, EventArgs e)
 {
     if (this.Session["twopass"] != null && this.Session["twopass"].ToString().Trim() == "IsAllowDel")
     {
         string value = this.hdnID.Value;
         if (PrjInfoAction.Del(value) == 1)
         {
             this.GridBind(this.ViewState["SQLWHERE"].ToString());
             string fid   = this.hdnID.Value.ToString();
             string fname = this.hdndelname.Value.ToString();
             myxml.SetTwoPWDlog(this.Session["yhdm"].ToString(), this.Page.Request.UserHostAddress.ToString(), "投标管理", fid, fname);
             return;
         }
         this.js.Text = "alert('删除失败!')";
     }
 }
Esempio n. 6
0
    private void DoAlertMsg(ArrayList TaskInfos)
    {
        string[] strArray        = new string[] { ConfigurationSettings.AppSettings["Artificial consumption"], ConfigurationSettings.AppSettings["Material consumption"], ConfigurationSettings.AppSettings["Equipment consumption"] };
        UserInfo currentUserInfo = userManageDb.GetCurrentUserInfo();

        for (int i = 0; i < TaskInfos.Count; i++)
        {
            ConstructTaskBook book = (ConstructTaskBook)TaskInfos[i];
            for (int j = 0; j < strArray.Length; j++)
            {
                AlertPoint point = new AlertPoint(strArray[j]);
                if (point.Options[2].IsSelected)
                {
                    SchedulePlanAction action = new SchedulePlanAction();
                    new ResourceItemAction();
                    AlertMessage message = new AlertMessage();
                    if (currentUserInfo != null)
                    {
                        message.ManInput = currentUserInfo.UserCode;
                    }
                    message.MenAlertTo     = point.YHDMsOfPeopleAlertTo;
                    message.TimeInput      = DateTime.Now;
                    message.TimeOutput     = DateTime.Now;
                    message.TimeOver       = DateTime.Now.AddDays(point.ValidTimeLong);
                    message.PresentimentID = point.pkID;
                    message.PrjCode        = this.ProjectCode.ToString();
                    DataTable table = TaskBookAction.DoAlert(this.ProjectCode, book.TaskCode, j + 1, book.TaskBookCode);
                    if (table.Rows.Count > 0)
                    {
                        foreach (DataRow row in table.Rows)
                        {
                            decimal num3 = (decimal.Parse(row["ResBudget"].ToString()) == 0M) ? 0M : (decimal.Parse(row["ResConsum"].ToString()) / decimal.Parse(row["ResBudget"].ToString()));
                            decimal num4 = (decimal.Parse(row["Quantity"].ToString()) == 0M) ? 0M : (decimal.Parse(row["Complete"].ToString()) / decimal.Parse(row["Quantity"].ToString()));
                            if (num3 > num4)
                            {
                                message.Message = string.Concat(new object[] { PrjInfoAction.GetProjectNameOfCode(this.ProjectCode.ToString()), "&nbsp;&nbsp;", action.GetTaskName(this.ProjectCode, book.TaskCode), "&nbsp;&nbsp;", row["ResourceName"].ToString(), "消耗比例超过工程完成比例(", decimal.Round(num3 * 100M, 2), "%/", decimal.Round(num4 * 100M, 2), "%)." });
                                message.Send();
                            }
                        }
                    }
                }
            }
        }
    }
Esempio n. 7
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         this.txt_StartDate.Attributes["onactivate"] = "getBeginDate();";
         this.txt_EndDate.Attributes["onactivate"]   = "getEndDate();";
         this.hdnSeeType.Value = base.Request.QueryString["SeeType"];
         this.Drop_QualityClass_Bind();
         this.Drop_PrjKindClass_Bind();
         this.ddt_stateBind();
         this.ddt_Area_Bind();
         this.Drop_zzGrade_Bind();
         this.Drop_ysType_Bind();
         this.Drop_cbType_Bind();
         this.Drop_Payment_Bind();
         this.Drop_zbType_Bind();
         this.Drop_jsType_Bind();
         this.Drop_PrimaryGrade_Bind();
         this.Drop_jzType_Bind();
         this.fatherPrj_Bind();
         if (base.Request.QueryString["OpType"] != "ADD")
         {
             this.ViewState["INFOCODE"] = base.Request.QueryString["Code"];
             PrjInfoModel pIM = new PrjInfoModel();
             pIM = PrjInfoAction.GetSingleInfo(this.ViewState["INFOCODE"].ToString());
             this.TextBind(pIM);
         }
         else
         {
             this.txt_StartDate.Text    = DateTime.Now.ToString("yyyy-M-dd");
             this.txt_EndDate.Text      = DateTime.Now.ToString("yyyy-M-dd");
             this.ViewState["INFOCODE"] = Guid.NewGuid();
         }
         if (base.Request.QueryString["OpType"] == "SEE")
         {
             this.btnSave.Visible = false;
         }
         this.HdnPrjCode.Value = this.ViewState["INFOCODE"].ToString();
     }
     this.FilesBind(18);
 }
Esempio n. 8
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        if (!this.timecompare(this.txt_StartDate.Text.ToString(), this.txt_EndDate.Text.ToString()))
        {
            this.js.Text = "alert('结束时间不能早于开始时间!')";
            return;
        }
        PrjInfoModel prjInfoModel = new PrjInfoModel();

        prjInfoModel = this.GetTextValue();
        if (base.Request.QueryString["OpType"] == "ADD")
        {
            if (!PrjInfoAction.CheckCode(prjInfoModel.PrjCode))
            {
                this.js.Text = "alert('项目编号重复,请更改后保存!');";
                return;
            }
            if (PrjInfoAction.ADD(prjInfoModel) == 1)
            {
                StringBuilder stringBuilder = new StringBuilder();
                if (this.ManagerCodeYW.Value.ToString() != "")
                {
                    stringBuilder.Append(this.ManagerCodeYW.Value.ToString()).Append("-").AppendLine();
                }
                if (this.Txt_businessman.Text.Trim().ToString() != "")
                {
                    stringBuilder.Append(this.Txt_businessman.Text.Trim().ToString()).AppendLine();
                }
                this.BLL_n.Add(prjInfoModel.PrjGuid.ToString(), this.Txt_grade.Text.ToString().Trim(), stringBuilder.ToString(), this.Txt_telphone.Text.Trim().ToString());
                this.js.Text = "alert('保存成功!');window.returnValue=true;window.close();";
                return;
            }
            this.js.Text = "alert('保存失败!');window.returnValue=false;window.close();";
            return;
        }
        else
        {
            if (this.ddt_state.SelectedValue == "16")
            {
                if (string.IsNullOrEmpty(this.HideManagerCode.Value))
                {
                    this.js.Text = "alert('项目经理不能为空!')";
                    return;
                }
                prjInfoModel.PrjState = "4";
                try
                {
                    string text = string.Empty;
                    if (this.fatherPrj.SelectedValue != "---请选择---")
                    {
                        text = PMAction.MakeClassCode(this.fatherPrj.SelectedValue.ToString());
                    }
                    else
                    {
                        text = PMAction.MakeClassCode("");
                    }
                    if (text != null && text.ToString() != "")
                    {
                        PrjInfoAction.ADD2(text, this.Session["yhdm"].ToString(), DateTime.Now.ToString(), prjInfoModel);
                    }
                    else
                    {
                        text = "001";
                        PrjInfoAction.ADD2(text, this.Session["yhdm"].ToString(), DateTime.Now.ToString(), prjInfoModel);
                    }
                    string mes = string.Concat(new string[]
                    {
                        "项目立项通知:编号为",
                        prjInfoModel.PrjCode,
                        "的",
                        prjInfoModel.PrjName,
                        "项目已经立项。"
                    });
                    this.getOrganiger(prjInfoModel.PrjGuid.ToString(), mes, this.HideManagerCode.Value.ToString());
                }
                catch
                {
                    this.js.Text = "alert('插入失败!')";
                    base.Response.End();
                }
            }
            int num = PrjInfoAction.Update(prjInfoModel);
            if (num == 1)
            {
                StringBuilder stringBuilder2 = new StringBuilder();
                if (this.ManagerCodeYW.Value.ToString() != "")
                {
                    stringBuilder2.Append(this.ManagerCodeYW.Value.ToString()).Append("-").AppendLine();
                }
                if (this.Txt_businessman.Text.Trim().ToString() != "")
                {
                    stringBuilder2.Append(this.Txt_businessman.Text.Trim().ToString()).AppendLine();
                }
                this.BLL_n.update(prjInfoModel.PrjGuid.ToString(), this.Txt_grade.Text.ToString().Trim(), stringBuilder2.ToString(), this.Txt_telphone.Text.Trim().ToString());
                this.js.Text = "alert('编辑成功!');window.returnValue=true;window.close();";
                return;
            }
            this.js.Text = "alert('" + sqlErr.sqlerr(num) + "'+'编辑失败!');window.returnValue=false;window.close();";
            return;
        }
    }
Esempio n. 9
0
 protected void btnSearch_Click(object sender, EventArgs e)
 {
     this.FramUrl = this.hdnUrl.Value;
     this.strURL  = PrjInfoAction.GetSqlWhere(this.GetValue()) + "&jw=" + this.jw;
 }