Пример #1
0
 public void InitPage()
 {
     if (!string.IsNullOrEmpty(this.consRepId))
     {
         try
         {
             string strWhere = string.Concat(new string[]
             {
                 " where I_XGID='",
                 this.consRepId,
                 "' and V_YHDM='",
                 base.UserCode,
                 "'"
             });
             PTDbsjBll pTDbsjBll = new PTDbsjBll();
             System.Collections.Generic.List <PTDbsjModel> listArray = pTDbsjBll.GetListArray(strWhere);
             if (listArray.Count == 1)
             {
                 pTDbsjBll.Delete(listArray[0].I_DBSJ_ID);
             }
         }
         catch
         {
         }
     }
 }
Пример #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!base.IsPostBack)
     {
         if (!string.IsNullOrEmpty(base.Request["planType"]))
         {
             string a = base.Request["planType"].ToString();
             if (a == "0")
             {
                 this.ShowAudit1.BusiCode = "130";
             }
             else
             {
                 this.ShowAudit1.BusiCode = "131";
             }
         }
         DataTable dataTable = PersonnelAction.QueryPersonnelById(base.UserCode);
         if (dataTable != null && dataTable.Rows.Count == 1)
         {
             this.lblBllProducer.Text = dataTable.Rows[0]["v_xm"].ToString();
         }
         this.lblPrintDate.Text = DateTime.Now.ToShortDateString();
         if (base.Request.QueryString["type"] == "0")
         {
             PTDbsjBll   pTDbsjBll  = new PTDbsjBll();
             PTDbsjModel modelByGID = pTDbsjBll.GetModelByGID(this.wkpid);
             pTDbsjBll.Delete(modelByGID.I_DBSJ_ID);
         }
         MainPlan model = new MainPlanAndAction().GetModel(new Guid(this.wkpid));
         this.lblCode.Text       = model.WkpUserCode;
         this.lblDate.Text       = model.WkpRecordDate.ToShortDateString();
         this.lblPart.Text       = new MainPlanAndAction().BackDept(model.WkpDeptId);
         this.lblReportName.Text = new MainPlanAndAction().BackUserName(model.WkpReportUser);
         string    sqlString  = "select * from pm_workplan_plansummary where wkpid='" + new Guid(this.wkpid) + "'";
         DataTable dataTable2 = publicDbOpClass.DataTableQuary(sqlString);
         if (dataTable2.Rows.Count > 0)
         {
             this.lblPlanSumm.Text = dataTable2.Rows[0]["wkpremarks"].ToString();
             this.lblScore.Text    = dataTable2.Rows[0]["wkpselfscore"].ToString();
             this.lblSumm.Text     = dataTable2.Rows[0]["wkpsummary"].ToString();
         }
         else
         {
             this.lblPlanSumm.Text = "";
             this.lblScore.Text    = "";
             this.lblSumm.Text     = "";
         }
         this.dl_Bind();
     }
 }
Пример #3
0
 public void InitPage()
 {
     if (!string.IsNullOrEmpty(this.ic))
     {
         try
         {
             PTDbsjBll   pTDbsjBll  = new PTDbsjBll();
             PTDbsjModel modelByGID = pTDbsjBll.GetModelByGID(this.ic);
             pTDbsjBll.Delete(modelByGID.I_DBSJ_ID);
         }
         catch
         {
         }
     }
 }
Пример #4
0
        public static void AddOrDelDesktopNotifications(string prjId, bool isEReport)
        {
            PTPrjInfoBll bll            = new PTPrjInfoBll();
            PrjInfoModel modelByPrjGuid = new PrjInfoModel();

            modelByPrjGuid = bll.GetModelByPrjGuid(prjId);
            string podepom = modelByPrjGuid.Podepom;

            string[] strArray = new string[0];
            if ((podepom != null) && podepom.Contains <char>(','))
            {
                strArray = podepom.Split(new char[] { ',' });
            }
            PTDbsjBll bll2 = new PTDbsjBll();

            bll2.DelPastDueData(prjId);
            if (isEReport)
            {
                foreach (string str2 in strArray)
                {
                    if (str2 != "")
                    {
                        StringBuilder builder = new StringBuilder();
                        builder.Append("项目:" + modelByPrjGuid.PrjName);
                        builder.Append("的间接成本已经上报,请审核!");
                        PTDbsjModel model = new PTDbsjModel {
                            C_OpenFlag = "0",
                            DTM_DBSJ   = DateTime.Now,
                            I_XGID     = prjId,
                            V_Content  = builder.ToString(),
                            V_DBLJ     = "BudgetManage/Cost/IndirectBudgetQuery.aspx?id=" + prjId,
                            V_LXBM     = "021",
                            V_TPLJ     = "new_Mail.gif",
                            V_YHDM     = str2
                        };
                        try
                        {
                            bll2.Add(model);
                        }
                        catch
                        {
                        }
                    }
                }
            }
        }
Пример #5
0
 protected void DelClicked()
 {
     try
     {
         string strWhere = string.Concat(new string[]
         {
             " where I_XGID='",
             base.Request["id"],
             "' and V_YHDM='",
             base.UserCode,
             "'"
         });
         PTDbsjBll pTDbsjBll = new PTDbsjBll();
         System.Collections.Generic.List <PTDbsjModel> listArray = pTDbsjBll.GetListArray(strWhere);
         if (listArray.Count > 0)
         {
             pTDbsjBll.Delete(listArray[0].I_DBSJ_ID);
         }
     }
     catch
     {
     }
 }
Пример #6
0
        public static void AddOrDelDesktopNotifications(string id, bool isEReport)
        {
            string        zZJGName = GetZZJGName(id);
            StringBuilder builder  = new StringBuilder();

            builder.Append("SELECT v_yhdm FROM PT_yhmc");
            builder.AppendLine();
            builder.AppendFormat("WHERE i_bmdm='{0}' AND State='1' AND c_sfyx='y'", id);
            SqlDataReader reader = SqlHelper.ExecuteReader(CommandType.Text, builder.ToString(), new SqlParameter[0]);
            PTDbsjBll     bll    = new PTDbsjBll();

            bll.DelPastDueData(id);
            while (reader.Read())
            {
                if (isEReport)
                {
                    string str2 = reader["v_yhdm"].ToString();
                    if (str2 != "")
                    {
                        StringBuilder builder2 = new StringBuilder();
                        builder2.Append("组织机构:" + zZJGName);
                        builder2.Append("的间接成本预算已经上报,请审核!");
                        PTDbsjModel model = new PTDbsjModel {
                            C_OpenFlag = "0",
                            DTM_DBSJ   = DateTime.Now,
                            I_XGID     = id,
                            V_Content  = builder2.ToString(),
                            V_DBLJ     = "BudgetManage/Cost/IndirectBudgetQuery.aspx?id=" + id,
                            V_LXBM     = "021",
                            V_TPLJ     = "new_Mail.gif",
                            V_YHDM     = str2
                        };
                        bll.Add(model);
                    }
                }
            }
        }
Пример #7
0
        public static void AddOrDelDesktopNotifications(string id, bool isEReport)
        {
            string zzjgName = OrganizationBudget.GetZZJGName(id);

            System.Text.StringBuilder sqlYHMC = new System.Text.StringBuilder();
            sqlYHMC.Append("SELECT v_yhdm FROM PT_yhmc");
            sqlYHMC.AppendLine();
            sqlYHMC.AppendFormat("WHERE i_bmdm='{0}' AND State='1' AND c_sfyx='y'", id);
            SqlDataReader sdrYHBM   = SqlHelper.ExecuteReader(CommandType.Text, sqlYHMC.ToString(), new SqlParameter[0]);
            PTDbsjBll     pTDbsjBll = new PTDbsjBll();

            pTDbsjBll.DelPastDueData(id);
            while (sdrYHBM.Read())
            {
                if (isEReport)
                {
                    string people = sdrYHBM["v_yhdm"].ToString();
                    if (people != "")
                    {
                        System.Text.StringBuilder content = new System.Text.StringBuilder();
                        content.Append("组织机构:" + zzjgName);
                        content.Append("的间接成本预算已经上报,请审核!");
                        pTDbsjBll.Add(new PTDbsjModel
                        {
                            C_OpenFlag = "0",
                            DTM_DBSJ   = System.DateTime.Now,
                            I_XGID     = id,
                            V_Content  = content.ToString(),
                            V_DBLJ     = "BudgetManage/Cost/IndirectBudgetQuery.aspx?id=" + id,
                            V_LXBM     = "021",
                            V_TPLJ     = "new_Mail.gif",
                            V_YHDM     = people
                        });
                    }
                }
            }
        }