Example #1
0
    private void SendDbsj(System.Collections.Generic.Dictionary <string, string> userCodeMailId)
    {
        this.GetUserList();
        PTDBSJService pTDBSJService = new PTDBSJService();

        foreach (System.Collections.Generic.KeyValuePair <string, string> current in userCodeMailId)
        {
            PTDBSJ pTDBSJ = new PTDBSJ();
            pTDBSJ.I_XGID   = current.Key;
            pTDBSJ.V_LXBM   = "008";
            pTDBSJ.V_YHDM   = current.Key;
            pTDBSJ.DTM_DBSJ = new System.DateTime?(System.DateTime.Now);
            string text = string.Empty;
            if (!string.IsNullOrEmpty(this.txtName.Text))
            {
                text = this.txtName.Text;
            }
            else
            {
                text = "【无主题】";
            }
            if (text.Length > 93)
            {
                text = text.Substring(0, 90) + "...";
            }
            pTDBSJ.V_Content  = "您有新邮件(" + text + ")";
            pTDBSJ.V_TPLJ     = "new_Mail.gif";
            pTDBSJ.V_DBLJ     = "OA2/Mail/MailFrame.aspx?mailId=" + current.Value;
            pTDBSJ.C_OpenFlag = "0";
            pTDBSJService.Add(pTDBSJ);
        }
    }
Example #2
0
    protected void btnSave_Click(object sender, System.EventArgs e)
    {
        if (this.txtTenderCostContent.Text.Trim().Length > 500)
        {
            base.RegisterShow("系统提示", "现场费内容不能超过500个字!");
            return;
        }
        if (this.txtTenderContent.Text.Trim().Length > 500)
        {
            base.RegisterShow("系统提示", "标书内容不能超过500个字!");
            return;
        }
        string     text = base.Request["id"];
        TenderInfo byId = TenderInfo.GetById(text);

        if (byId != null)
        {
            byId.ProjTenderBeginDate = new System.DateTime?(System.Convert.ToDateTime(this.txtTenderBeginDate.Text));
            decimal?tenderAverage = null;
            if (!string.IsNullOrEmpty(this.txtTenderAverage.Text))
            {
                tenderAverage = new decimal?(System.Convert.ToDecimal(this.txtTenderAverage.Text));
            }
            byId.TenderAverage = tenderAverage;
            decimal?tenderCeilingPrice = null;
            if (!string.IsNullOrEmpty(this.txtTenderCeilingPrice.Text))
            {
                tenderCeilingPrice = new decimal?(System.Convert.ToDecimal(this.txtTenderCeilingPrice.Text));
            }
            byId.TenderCeilingPrice = tenderCeilingPrice;
            decimal?projTenderEarnestMoney = null;
            if (!string.IsNullOrEmpty(this.txtTenderEarnestMoney.Text))
            {
                projTenderEarnestMoney = new decimal?(System.Convert.ToDecimal(this.txtTenderEarnestMoney.Text));
            }
            byId.ProjTenderEarnestMoney = projTenderEarnestMoney;
            decimal?tenderQuote = null;
            if (!string.IsNullOrEmpty(this.txtTenderQuote.Text))
            {
                tenderQuote = new decimal?(System.Convert.ToDecimal(this.txtTenderQuote.Text));
            }
            byId.TenderQuote           = tenderQuote;
            byId.TenderUnit            = this.txtTenderUnit.Text;
            byId.TenderAppraiseMethod  = this.dropTenderAppraiseMethod.SelectedValue;
            byId.ProjTenderCostContent = this.txtTenderCostContent.Text;
            System.DateTime?projTenderAnswerDate = null;
            if (!string.IsNullOrEmpty(this.txtTenderAnswerDate.Text))
            {
                projTenderAnswerDate = new System.DateTime?(System.Convert.ToDateTime(this.txtTenderAnswerDate.Text));
            }
            byId.ProjTenderAnswerDate = projTenderAnswerDate;
            byId.ProjTenderPayWay     = this.dropTenderPayWay.SelectedValue;
            byId.ProjTenderRemark     = this.txtTenderRemark.Text;
            byId.ProjTenderContent    = this.txtTenderContent.Text;
            byId.PrjManager           = this.txtTenderPrjManager.Text;
            if (!string.IsNullOrWhiteSpace(this.txtTenderProspect.Text))
            {
                byId.TenderProspect = new System.DateTime?(System.Convert.ToDateTime(this.txtTenderProspect.Text));
            }
            if (!string.IsNullOrEmpty(this.hfldTenderReadOne.Value))
            {
                byId.TenderReadOne = this.hfldTenderReadOne.Value;
                PTDBSJService pTDBSJService = new PTDBSJService();
                pTDBSJService.Add(new PTDBSJ
                {
                    I_XGID     = byId.PrjGuid.ToString(),
                    V_LXBM     = "024",
                    V_YHDM     = this.hfldTenderReadOne.Value,
                    DTM_DBSJ   = new System.DateTime?(System.DateTime.Now),
                    C_OpenFlag = "0",
                    V_Content  = "项目:" + byId.PrjName + "已经投标",
                    V_DBLJ     = "TenderManage/InfoView.aspx?ic=" + byId.PrjGuid.ToString(),
                    V_TPLJ     = "new_Mail.gif"
                });
            }
            PTPrjInfoZTBService pTPrjInfoZTBService = new PTPrjInfoZTBService();
            PTPrjInfoZTB        byId2 = pTPrjInfoZTBService.GetById(new System.Guid(text));
            byId2.PrjStateChangeTime = new System.DateTime?(System.DateTime.Now);
            pTPrjInfoZTBService.Update(byId2);
            byId.UpdatePart(byId, "4");
            string str = "BidManage.aspx";
            if (!string.IsNullOrEmpty(base.Request["purl"]))
            {
                str = base.Request["purl"];
            }
            string message = "CancelClick('" + str + "',true);";
            base.RegisterScript(message);
        }
    }
Example #3
0
 protected void btnSave_Click(object sender, System.EventArgs e)
 {
     if (!string.IsNullOrEmpty(this.txtPrjCode.Value) && !string.IsNullOrEmpty(this.txtPrjName.Text.Trim()) && !string.IsNullOrEmpty(this.txtStartDate.Text.Trim()))
     {
         string value = this.txtEndDate.Text.Trim();
         if (!string.IsNullOrEmpty(value))
         {
             string value2 = this.txtStartDate.Text.Trim();
             int    num    = System.Convert.ToDateTime(value).CompareTo(System.Convert.ToDateTime(value2));
             if (num < 0)
             {
                 base.RegisterShow("系统提示", "计划结束日期不能小于计划开始日期,请重新选择日期!");
                 return;
             }
         }
         if (this.action == "Add")
         {
             try
             {
                 bool flag  = ProjectInfo.IsSameCode(this.txtPrjCode.Value.Trim());
                 bool flag2 = TenderInfo.IsSameName(this.txtPrjName.Text.Trim());
                 if (!flag)
                 {
                     if (!flag2)
                     {
                         ProjectInfo model = this.getModel(null);
                         model.InputDate = new System.DateTime?(System.DateTime.Now);
                         model.InputUser = base.UserCode;
                         model.PrjGuid   = new System.Guid(this.hfldPrjGuid.Value);
                         model.Add(model);
                         if (!string.IsNullOrEmpty(model.PrjReadOne))
                         {
                             PTDBSJService pTDBSJService = new PTDBSJService();
                             pTDBSJService.Add(new PTDBSJ
                             {
                                 I_XGID     = model.PrjGuid.ToString(),
                                 V_LXBM     = "024",
                                 V_YHDM     = model.PrjReadOne,
                                 DTM_DBSJ   = new System.DateTime?(System.DateTime.Now),
                                 C_OpenFlag = "0",
                                 V_Content  = "项目:" + model.PrjName + "已经编制成功",
                                 V_DBLJ     = "PrjManager/PrjInfoView.aspx?ic=" + model.PrjGuid.ToString(),
                                 V_TPLJ     = "new_Mail.gif"
                             });
                         }
                         tenderBondAdd(model.PrjGuid.ToString());//保存 投标保证金
                         string str = "PrjInfoList.aspx";
                         base.RegisterScript("winclose('PrjInfoAdd', '" + str + "', true);");
                     }
                     else
                     {
                         base.RegisterShow("系统提示", "该项目名称已经存在");
                     }
                 }
                 else
                 {
                     if (!flag2)
                     {
                         IApplicationContext context     = ContextRegistry.GetContext();
                         IProjectCode        projectCode = context.GetObject("ProjectCode") as IProjectCode;
                         string      text   = projectCode.CreateProjectCode();
                         ProjectInfo model2 = this.getModel(null);
                         model2.InputDate = new System.DateTime?(System.DateTime.Now);
                         model2.InputUser = base.UserCode;
                         string prjGuid = "";
                         model2.TypeCode = ProjectInfo.GetTypeCode(prjGuid);
                         model2.PrjCode  = text;
                         model2.Add(model2);
                         if (!string.IsNullOrEmpty(model2.PrjReadOne))
                         {
                             PTDBSJService pTDBSJService2 = new PTDBSJService();
                             pTDBSJService2.Add(new PTDBSJ
                             {
                                 I_XGID     = model2.PrjGuid.ToString(),
                                 V_LXBM     = "024",
                                 V_YHDM     = model2.PrjReadOne,
                                 DTM_DBSJ   = new System.DateTime?(System.DateTime.Now),
                                 C_OpenFlag = "0",
                                 V_Content  = "项目:" + model2.PrjName + "已经编制成功",
                                 V_DBLJ     = "PrjManager/PrjInfoView.aspx?ic=" + model2.PrjGuid.ToString(),
                                 V_TPLJ     = "new_Mail.gif"
                             });
                         }
                         tenderBondAdd(model2.PrjGuid.ToString());//保存 投标保证金
                         string str2  = "添加成功,但编号为" + this.txtPrjCode.Value.Trim() + "的项目已经存在,当前项目的项目编号已经保存为" + text;
                         string text2 = "PrjInfoList.aspx";
                         string str3  = "?returnMsg=" + str2;
                         text2 += str3;
                         base.RegisterScript("winclose('PrjInfoAdd', '" + text2 + "', true);");
                     }
                     else
                     {
                         base.RegisterShow("系统提示", "该项目名称已经存在");
                     }
                 }
                 return;
             }
             catch (System.Exception ex)
             {
                 Log4netHelper.Error(ex, "项目立项添加失败", base.UserCode);
                 base.RegisterShow("系统提示", "添加失败");
                 return;
             }
         }
         try
         {
             bool flag3 = ProjectInfo.UpdateIsSameCode(this.ViewState["oldCode"].ToString(), this.txtPrjCode.Value.Trim());
             bool flag4 = TenderInfo.UpdateIsSameName(this.ViewState["oldName"].ToString(), this.txtPrjName.Text.Trim());
             if (!flag3)
             {
                 if (!flag4)
                 {
                     ProjectInfo projectInfo = ProjectInfo.GetById(base.Request["PrjId"].ToString());
                     if (projectInfo != null)
                     {
                         projectInfo = this.getModel(projectInfo);
                         projectInfo.Update(projectInfo, base.Request["PrjId"].ToString());
                         tenderBondUpdate(base.Request["PrjId"].ToString());//保存 投标保证金
                         if (!string.IsNullOrEmpty(projectInfo.PrjReadOne))
                         {
                             PTDBSJService pTDBSJService3 = new PTDBSJService();
                             pTDBSJService3.Add(new PTDBSJ
                             {
                                 I_XGID     = projectInfo.PrjGuid.ToString(),
                                 V_LXBM     = "024",
                                 V_YHDM     = projectInfo.PrjReadOne,
                                 DTM_DBSJ   = new System.DateTime?(System.DateTime.Now),
                                 C_OpenFlag = "0",
                                 V_Content  = "项目:" + projectInfo.PrjName + "已经编制成功",
                                 V_DBLJ     = "PrjManager/PrjInfoView.aspx?ic=" + projectInfo.PrjGuid.ToString(),
                                 V_TPLJ     = "new_Mail.gif"
                             });
                         }
                         new System.Text.StringBuilder();
                         string text3 = "PrjInfoList.aspx";
                         if (!string.IsNullOrEmpty(base.Request.QueryString["purl"]))
                         {
                             text3 = base.Request["purl"].ToString();
                         }
                         string str4 = "?returnMsg=更新成功";
                         text3 += str4;
                         base.RegisterScript("winclose('PrjInfoAdd', '" + text3 + "', true);");
                     }
                     else
                     {
                         base.RegisterShow("系统提示", "该项目已经被删除,不能进行编辑");
                     }
                 }
                 else
                 {
                     base.RegisterShow("系统提示", "该项目名称已经存在");
                 }
             }
             else
             {
                 base.RegisterShow("系统提示", "该项目编号已经存在");
             }
             return;
         }
         catch (System.Exception ex2)
         {
             Log4netHelper.Error(ex2, "项目立项编辑失败", base.UserCode);
             base.RegisterShow("系统提示", "更新失败");
             return;
         }
     }
     base.RegisterShow("系统提示", "项目名称和计划开始日期都不能为空!");
 }
Example #4
0
 protected void btnSave_Click(object sender, System.EventArgs e)
 {
     try
     {
         string prjGuid = this.hfldPrjId.Value;
         if (!string.IsNullOrEmpty(prjGuid))
         {
             TenderInfo      byId                  = TenderInfo.GetById(prjGuid);
             System.DateTime?projApplyDate         = null;
             System.DateTime?qualificationFailData = null;
             if (!string.IsNullOrEmpty(this.txtApplyDate1.Text.Trim()))
             {
                 projApplyDate = new System.DateTime?(System.Convert.ToDateTime(this.txtApplyDate1.Text.Trim()));
             }
             byId.ProjApplyDate = projApplyDate;
             System.DateTime?projApprovalDate = null;
             if (!string.IsNullOrEmpty(this.txtApprovalDate1.Text.Trim()))
             {
                 projApprovalDate = new System.DateTime?(System.Convert.ToDateTime(this.txtApprovalDate1.Text.Trim()));
             }
             byId.ProjApprovalDate = projApprovalDate;
             System.DateTime?projTenderDate = null;
             if (!string.IsNullOrEmpty(this.txtTenderDate1.Text))
             {
                 projTenderDate = new System.DateTime?(System.Convert.ToDateTime(this.txtTenderDate1.Text.Trim()));
             }
             byId.ProjTenderDate = projTenderDate;
             if (!string.IsNullOrEmpty(this.txtRegistDeadline1.Text.Trim()))
             {
                 byId.ProjRegistDeadline = new int?(System.Convert.ToInt32(this.txtRegistDeadline1.Text.Trim()));
             }
             byId.ProgAgent = this.hfldAgent1.Value;
             byId.PrequalificationRequire = this.txtPrequalificationRequire1.Text.Trim();
             if (!string.IsNullOrWhiteSpace(this.txtQualificationMargin1.Text))
             {
                 byId.QualificationMargin = System.Convert.ToDecimal(this.txtQualificationMargin1.Text.Trim());
             }
             byId.QualificationReadOne = this.hfldQualificationReadOne1.Value;
             if (!string.IsNullOrEmpty(this.txtFailDate.Text))
             {
                 qualificationFailData = new System.DateTime?(System.Convert.ToDateTime(this.txtFailDate.Text.Trim()));
             }
             byId.QualificationFailData   = qualificationFailData;
             byId.QualificationFailReason = this.txtFailReason.Text.Trim();
             if (!string.IsNullOrEmpty(byId.QualificationReadOne))
             {
                 PTDBSJService pTDBSJService = new PTDBSJService();
                 pTDBSJService.Add(new PTDBSJ
                 {
                     I_XGID     = byId.PrjGuid.ToString(),
                     V_LXBM     = "024",
                     V_YHDM     = byId.QualificationReadOne,
                     DTM_DBSJ   = new System.DateTime?(System.DateTime.Now),
                     C_OpenFlag = "0",
                     V_Content  = "项目:" + byId.PrjName + "已经开始预审失败",
                     V_DBLJ     = "TenderManage/InfoView.aspx?ic=" + byId.PrjGuid.ToString(),
                     V_TPLJ     = "new_Mail.gif"
                 });
             }
             if (!string.IsNullOrEmpty(this.txtApplyDate1.Text.Trim()))
             {
                 PTDBSJTodayService pTDBSJTodayService = new PTDBSJTodayService();
                 System.Collections.Generic.List <PTDBSJToday> list = (
                     from dbsj in pTDBSJTodayService
                     where dbsj.I_XGID == prjGuid
                     select dbsj).ToList <PTDBSJToday>();
                 foreach (PTDBSJToday current in list)
                 {
                     pTDBSJTodayService.Delete(current);
                 }
                 //System.Collections.Generic.List<TenderUser> byId2 = TenderUser.GetById(byId.PrjGuid.ToString());
                 string          str   = @"with t as (select m.*,yh.v_xm from PT_PrjInfo_ZTB_User m left join PT_yhmc yh on m.UserCode = yh.v_yhdm where  m.PrjGuid ='" + byId.PrjGuid.ToString() + "') select Id, PrjGuid, UserCode, v_xm UserName from t";
                 DataSet         ds    = publicDbOpClass.DataSetQuary(str);
                 System.DateTime value = System.Convert.ToDateTime(this.txtApplyDate1.Text.Trim()).AddDays((double)(-(double)System.Convert.ToInt32(this.SignUpWarnDay)));
                 //foreach (TenderUser current2 in byId2)
                 foreach (DataRow current2 in ds.Tables[0].Rows)
                 {
                     pTDBSJTodayService.Add(new PTDBSJToday
                     {
                         I_XGID     = prjGuid,
                         V_LXBM     = "027",
                         V_YHDM     = current2["UserCode"].ToString(),                        //current2.UserCode,
                         DTM_DBSJ   = new System.DateTime?(value),
                         V_TPLJ     = "",
                         V_DBLJ     = "TenderManage/InfoView.aspx?ic=" + prjGuid,
                         V_Content  = "名称为:" + byId.PrjName + "的项目已经开始预审失败。",
                         C_OpenFlag = "1"
                     });
                 }
             }
             PTPrjInfoZTBService pTPrjInfoZTBService = new PTPrjInfoZTBService();
             PTPrjInfoZTB        byId3 = pTPrjInfoZTBService.GetById(new System.Guid(prjGuid));
             byId3.PrjStateChangeTime = new System.DateTime?(System.DateTime.Now);
             pTPrjInfoZTBService.Update(byId3);
             byId.UpdatePart(byId, ProjectParameter.QualificationFail);
             base.RegisterScript("top.ui.show('预审失败资料保存成功!');top.ui.winSuccess({parentName:'_QulifcationFail'});");
         }
     }
     catch
     {
         base.RegisterScript("top.ui.alert('预审失败资料保存失败!');top.ui.winSuccess({parentName:'_QulifcationFail'});");
     }
 }
 protected void btnSaveData_Click(object sender, System.EventArgs e)
 {
     try
     {
         string          prjGuid       = this.hfldPrjId.Value;
         TenderInfo      byId          = TenderInfo.GetById(prjGuid);
         System.DateTime?projApplyDate = null;
         if (!string.IsNullOrEmpty(this.txtApplyDate.Text))
         {
             projApplyDate = new System.DateTime?(System.Convert.ToDateTime(this.txtApplyDate.Text));
         }
         byId.ProjApplyDate = projApplyDate;
         System.DateTime?projApprovalDate = null;
         if (!string.IsNullOrEmpty(this.txtApprovalDate.Text))
         {
             projApprovalDate = new System.DateTime?(System.Convert.ToDateTime(this.txtApprovalDate.Text));
         }
         byId.ProjApprovalDate = projApprovalDate;
         System.DateTime?projTenderDate = null;
         if (!string.IsNullOrEmpty(this.txtTenderDate.Text))
         {
             projTenderDate = new System.DateTime?(System.Convert.ToDateTime(this.txtTenderDate.Text));
         }
         byId.ProjTenderDate = projTenderDate;
         if (!string.IsNullOrEmpty(this.txtRegistDeadline.Text))
         {
             byId.ProjRegistDeadline = new int?(int.Parse(this.txtRegistDeadline.Text));
         }
         byId.ProgAgent = this.hfldAgent.Value;
         byId.PrequalificationRequire = this.txtPrequalificationRequire.Text;
         if (!string.IsNullOrWhiteSpace(this.txtQualificationMargin.Text))
         {
             byId.QualificationMargin = System.Convert.ToDecimal(this.txtQualificationMargin.Text);
         }
         byId.QualificationReadOne = this.hfldQualificationReadOne.Value;
         byId.UpdatePart(byId, ProjectParameter.Prequalification);
         System.Guid prjId = new System.Guid(prjGuid);
         bool        flag  = this.prjInfoSer.IsExist(prjId);
         if (flag)
         {
             PTPrjInfo byId2 = this.prjInfoSer.GetById(prjGuid);
             byId2.PrjState = new int?(System.Convert.ToInt32(ProjectParameter.Prequalification));
             this.prjInfoSer.Update(byId2);
         }
         if (!string.IsNullOrEmpty(byId.QualificationReadOne))
         {
             PTDBSJService pTDBSJService = new PTDBSJService();
             pTDBSJService.Add(new PTDBSJ
             {
                 I_XGID     = byId.PrjGuid.ToString(),
                 V_LXBM     = "024",
                 V_YHDM     = byId.QualificationReadOne,
                 DTM_DBSJ   = new System.DateTime?(System.DateTime.Now),
                 C_OpenFlag = "0",
                 V_Content  = "项目:" + byId.PrjName + "已经开始资格预审",
                 V_DBLJ     = "TenderManage/InfoView.aspx?ic=" + byId.PrjGuid.ToString(),
                 V_TPLJ     = "new_Mail.gif"
             });
         }
         if (!string.IsNullOrEmpty(this.txtApplyDate.Text.Trim()))
         {
             PTDBSJTodayService pTDBSJTodayService = new PTDBSJTodayService();
             System.Collections.Generic.List <PTDBSJToday> list = (
                 from dbsj in pTDBSJTodayService
                 where dbsj.I_XGID == prjGuid
                 select dbsj).ToList <PTDBSJToday>();
             foreach (PTDBSJToday current in list)
             {
                 pTDBSJTodayService.Delete(current);
             }
             System.Collections.Generic.List <TenderUser> byId3 = TenderUser.GetById(byId.PrjGuid.ToString());
             System.DateTime value = System.Convert.ToDateTime(this.txtApplyDate.Text.Trim()).AddDays((double)(-(double)System.Convert.ToInt32(this.SignUpWarnDay)));
             foreach (TenderUser current2 in byId3)
             {
                 pTDBSJTodayService.Add(new PTDBSJToday
                 {
                     I_XGID     = prjGuid,
                     V_LXBM     = "027",
                     V_YHDM     = current2.UserCode,
                     DTM_DBSJ   = new System.DateTime?(value),
                     V_TPLJ     = "",
                     V_DBLJ     = "TenderManage/InfoView.aspx?ic=" + prjGuid,
                     V_Content  = "名称为:" + byId.PrjName + "的项目已经开始报名。",
                     C_OpenFlag = "1"
                 });
             }
         }
         this.bindGv();
         base.RegisterShow("系统提示", "保存成功");
     }
     catch (System.Exception)
     {
         base.RegisterShow("系统提示", "保存失败");
     }
 }