Exemplo n.º 1
0
 protected void Page_Load(object sender, System.EventArgs e)
 {
     base.Response.Cache.SetNoStore();
     if (!this.Page.IsPostBack)
     {
         this.DataBindDepartment();
         string text = base.Request["ids"].ToString();
         System.Collections.Generic.IList <string> @string = this.GetString(text);
         System.Collections.Generic.IList <string> list    = new System.Collections.Generic.List <string>();
         if (@string.Count == 1)
         {
             System.Collections.Generic.List <TenderUser> byId = TenderUser.GetById(text);
             foreach (TenderUser current in byId)
             {
                 list.Add(current.UserCode);
             }
             this.hfldUserCodes.Value = JsonHelper.JsonSerializer <string[]>(list.ToArray <string>());
         }
         this.DataBindUserName(list);
         return;
     }
     if (this.hfldUserCodes.Value != "")
     {
         System.Collections.Generic.List <string> listFromJson = JsonHelper.GetListFromJson(this.hfldUserCodes.Value);
         this.DataBindUserName(listFromJson);
     }
 }
Exemplo n.º 2
0
    protected void btnSave_Click(object sender, System.EventArgs e)
    {
        System.Collections.Generic.List <string> userCodes = this.GetUserCodes(this.hfldUserCodes.Value);
        string text = base.Request["ids"].ToString().TrimEnd(new char[]
        {
            ','
        });

        text = text.Replace(",", "\",\"");
        try
        {
            if (text.Contains(","))
            {
                System.Collections.Generic.List <string> userCodes2 = this.GetUserCodes(text);
                TenderUser.AddUser(userCodes2, userCodes);
            }
            else
            {
                TenderUser.AddUser(text, userCodes);
            }
            base.RegisterScript("top.ui.alert('更新成功!'); top.ui.closeWin(); top.ui.reloadTab();");
        }
        catch (System.Exception)
        {
            base.RegisterShow("系统提示", "更新失败");
        }
    }
Exemplo n.º 3
0
    protected void btnSave_Click(object sender, System.EventArgs e)
    {
        System.Collections.Generic.List <string> @string = this.GetString(this.hfldUserCodes.Value);
        string text = base.Request["ids"].ToString();

        try
        {
            if (text.Contains(","))
            {
                System.Collections.Generic.List <string> string2 = this.GetString(text);
                TenderUser.AddUser(string2, @string);
            }
            else
            {
                TenderUser.AddUser(text, @string);
            }
            System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder();
            stringBuilder.Append("alert('系统提示:\\n\\n更新成功')").Append(System.Environment.NewLine);
            stringBuilder.Append("winclose('SetPrjRole', 'PrjInfoList.aspx', true);");
            base.RegisterScript(stringBuilder.ToString());
        }
        catch
        {
            base.RegisterScript("alert('系统提示:\\n\\n更新失败')");
        }
    }
Exemplo n.º 4
0
 public static void AddLimit(Guid guid)
 {
     using (pm2Entities entities = new pm2Entities())
     {
         List <string> codes = GetCodes(guid.ToString());
         if (codes.Count > 0)
         {
             foreach (string str in TenderUser.GetUserCodes(guid))
             {
                 if (codes.Contains(str))
                 {
                     codes.Remove(str);
                 }
             }
             foreach (string str2 in codes)
             {
                 PT_PrjInfo_ZTB_User user = new PT_PrjInfo_ZTB_User {
                     Id       = Guid.NewGuid().ToString(),
                     PrjGuid  = new Guid?(guid),
                     UserCode = str2
                 };
                 entities.AddToPT_PrjInfo_ZTB_User(user);
             }
             entities.SaveChanges();
         }
     }
 }
Exemplo n.º 5
0
 protected void Page_Load(object sender, System.EventArgs e)
 {
     base.Response.Cache.SetNoStore();
     if (!this.Page.IsPostBack)
     {
         this.DataBindDepartment();
         string text = base.Request["ids"].ToString();
         System.Collections.Generic.List <string> list = new System.Collections.Generic.List <string>();
         if (!text.Contains(","))
         {
             System.Collections.Generic.List <TenderUser> byId = TenderUser.GetById(text);
             foreach (TenderUser current in byId)
             {
                 HiddenField expr_6E = this.hfldUserCodes;
                 expr_6E.Value = expr_6E.Value + current.UserCode + ",";
                 list.Add(current.UserCode);
             }
             this.DataBindUserName(list);
         }
     }
 }
Exemplo n.º 6
0
 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("系统提示", "保存失败");
     }
 }