コード例 #1
0
ファイル: ResourceAlarm.cs プロジェクト: zxl881203/src
        public void AddAlarm()
        {
            new MaterialWantPlan();
            List <string> prjUsers = this.prjPlan.GetPrjUsers(this.prjPlan.ProjectCode);

            if (prjUsers != null)
            {
                PTDbsjBll bll = new PTDbsjBll();
                foreach (string str in prjUsers)
                {
                    PTDbsjModel model = new PTDbsjModel {
                        C_OpenFlag = "0",
                        DTM_DBSJ   = DateTime.Now,
                        I_XGID     = this.planGuid,
                        V_Content  = string.Format("物资需求计划:{0} 超出预算", this.planCode),
                        V_DBLJ     = "StockManage/basicset/WantplanView.aspx?ic=" + this.planGuid,
                        V_LXBM     = "021",
                        V_TPLJ     = "new_Mail.gif",
                        V_YHDM     = str
                    };
                    try
                    {
                        bll.Add(model);
                    }
                    catch
                    {
                    }
                }
            }
        }
コード例 #2
0
ファイル: ShowView.aspx.cs プロジェクト: zxl881203/src
    public void InitPage()
    {
        PTDbsjModel modelByGID = this.pTDbsjBll.GetModelByGID(this.id);

        this.lbRecordDate.Text = modelByGID.DTM_DBSJ.ToString();
        this.lbContent.Text    = modelByGID.V_Content;
    }
コード例 #3
0
        public int Update(PTDbsjModel model)
        {
            StringBuilder builder = new StringBuilder();

            builder.Append("update PT_DBSJ set ");
            builder.Append("I_XGID=@I_XGID,");
            builder.Append("V_LXBM=@V_LXBM,");
            builder.Append("V_YHDM=@V_YHDM,");
            builder.Append("DTM_DBSJ=@DTM_DBSJ,");
            builder.Append("V_Content=@V_Content,");
            builder.Append("V_TPLJ=@V_TPLJ,");
            builder.Append("V_DBLJ=@V_DBLJ,");
            builder.Append("C_OpenFlag=@C_OpenFlag");
            builder.Append(" where I_DBSJ_ID=@I_DBSJ_ID ");
            SqlParameter[] commandParameters = new SqlParameter[] { new SqlParameter("@I_DBSJ_ID", SqlDbType.Int, 4), new SqlParameter("@I_XGID", SqlDbType.VarChar, 50), new SqlParameter("@V_LXBM", SqlDbType.VarChar, 10), new SqlParameter("@V_YHDM", SqlDbType.VarChar, 8), new SqlParameter("@DTM_DBSJ", SqlDbType.DateTime), new SqlParameter("@V_Content", SqlDbType.VarChar, 200), new SqlParameter("@V_TPLJ", SqlDbType.VarChar, 50), new SqlParameter("@V_DBLJ", SqlDbType.VarChar, 200), new SqlParameter("@C_OpenFlag", SqlDbType.Char, 1) };
            commandParameters[0].Value = model.I_DBSJ_ID;
            commandParameters[1].Value = model.I_XGID;
            commandParameters[2].Value = model.V_LXBM;
            commandParameters[3].Value = model.V_YHDM;
            commandParameters[4].Value = model.DTM_DBSJ;
            commandParameters[5].Value = model.V_Content;
            commandParameters[6].Value = model.V_TPLJ;
            commandParameters[7].Value = model.V_DBLJ;
            commandParameters[8].Value = model.C_OpenFlag;
            return(SqlHelper.ExecuteNonQuery(CommandType.Text, builder.ToString(), commandParameters));
        }
コード例 #4
0
ファイル: Common2.cs プロジェクト: zxl881203/src
        public static void AlarmMethod(string tcode, string scode)
        {
            string str = DateTime.Now.ToString("MMddHHmmsss");

            if (StockParameter.IsLowAlarm)
            {
                string str2 = treasuryStockBll.AlarmMethod(tcode, scode).ToString();
                if (string.IsNullOrEmpty(str2))
                {
                    str2 = "0";
                }
                string        str3  = alarmNumBll.AlarmMethod(tcode, scode).ToString();
                TreasuryModel model = new Treasury().GetModel(tcode);
                if ((!string.IsNullOrEmpty(str2) && !string.IsNullOrEmpty(str3)) && (Convert.ToDecimal(str2) <= Convert.ToDecimal(str3)))
                {
                    foreach (TreasuryPermit permit in treasuryPermitBll.GetAllTreasuryPermitByWhere(" where tcode='" + tcode + "' and ptype='Person'"))
                    {
                        if (permit.pcode != "")
                        {
                            PTDbsjModel model2 = new PTDbsjModel {
                                C_OpenFlag = "0",
                                DTM_DBSJ   = DateTime.Now,
                                I_XGID     = str,
                                V_Content  = model.tname + "中的" + scode + "库存量不足,最低库存量不得少于" + str3,
                                V_DBLJ     = "StockManage/basicset/ShowView.aspx?gid=" + str,
                                V_LXBM     = "021",
                                V_TPLJ     = "new_Mail.gif",
                                V_YHDM     = permit.pcode
                            };
                            pTDbsjBll.Add(model2);
                        }
                    }
                }
            }
        }
コード例 #5
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();
     }
 }
コード例 #6
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
         {
         }
     }
 }
コード例 #7
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
                        {
                        }
                    }
                }
            }
        }
コード例 #8
0
        public PTDbsjModel GetModelByGID(string I_XGID)
        {
            StringBuilder builder = new StringBuilder();

            builder.Append("select I_DBSJ_ID,I_XGID,V_LXBM,V_YHDM,DTM_DBSJ,V_Content,V_TPLJ,V_DBLJ,C_OpenFlag from PT_DBSJ ");
            builder.Append(" where I_XGID=@I_XGID ");
            PTDbsjModel model = null;

            using (IDataReader reader = SqlHelper.ExecuteReader(CommandType.Text, builder.ToString(), new SqlParameter[] { new SqlParameter("@I_XGID", I_XGID) }))
            {
                if (reader.Read())
                {
                    model = this.ReaderBind(reader);
                }
            }
            return(model);
        }
コード例 #9
0
        public int Add(PTDbsjModel model)
        {
            StringBuilder builder = new StringBuilder();

            builder.Append("insert into PT_DBSJ(");
            builder.Append("I_XGID,V_LXBM,V_YHDM,DTM_DBSJ,V_Content,V_TPLJ,V_DBLJ,C_OpenFlag)");
            builder.Append(" values (");
            builder.Append("@I_XGID,@V_LXBM,@V_YHDM,@DTM_DBSJ,@V_Content,@V_TPLJ,@V_DBLJ,@C_OpenFlag)");
            SqlParameter[] commandParameters = new SqlParameter[] { new SqlParameter("@I_XGID", SqlDbType.VarChar, 50), new SqlParameter("@V_LXBM", SqlDbType.VarChar, 10), new SqlParameter("@V_YHDM", SqlDbType.VarChar, 8), new SqlParameter("@DTM_DBSJ", SqlDbType.DateTime), new SqlParameter("@V_Content", SqlDbType.VarChar, 200), new SqlParameter("@V_TPLJ", SqlDbType.VarChar, 50), new SqlParameter("@V_DBLJ", SqlDbType.VarChar, 200), new SqlParameter("@C_OpenFlag", SqlDbType.Char, 1) };
            commandParameters[0].Value = model.I_XGID;
            commandParameters[1].Value = model.V_LXBM;
            commandParameters[2].Value = model.V_YHDM;
            commandParameters[3].Value = model.DTM_DBSJ;
            commandParameters[4].Value = model.V_Content;
            commandParameters[5].Value = model.V_TPLJ;
            commandParameters[6].Value = model.V_DBLJ;
            commandParameters[7].Value = model.C_OpenFlag;
            return(Convert.ToInt32(SqlHelper.ExecuteScalar(CommandType.Text, builder.ToString(), commandParameters)));
        }
コード例 #10
0
        public PTDbsjModel ReaderBind(IDataReader dataReader)
        {
            PTDbsjModel model = new PTDbsjModel();
            object      obj2  = dataReader["I_DBSJ_ID"];

            if ((obj2 != null) && (obj2 != DBNull.Value))
            {
                model.I_DBSJ_ID = (int)obj2;
            }
            model.I_XGID = dataReader["I_XGID"].ToString();
            model.V_LXBM = dataReader["V_LXBM"].ToString();
            model.V_YHDM = dataReader["V_YHDM"].ToString();
            obj2         = dataReader["DTM_DBSJ"];
            if ((obj2 != null) && (obj2 != DBNull.Value))
            {
                model.DTM_DBSJ = (DateTime)obj2;
            }
            model.V_Content  = dataReader["V_Content"].ToString();
            model.V_TPLJ     = dataReader["V_TPLJ"].ToString();
            model.V_DBLJ     = dataReader["V_DBLJ"].ToString();
            model.C_OpenFlag = dataReader["C_OpenFlag"].ToString();
            return(model);
        }
コード例 #11
0
ファイル: OrganizationBudget.cs プロジェクト: zxl881203/src
        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);
                    }
                }
            }
        }
コード例 #12
0
ファイル: Common2.cs プロジェクト: zxl881203/src
        private static void IncometContractAlarm()
        {
            ConConfigContractService service = new ConConfigContractService();
            IncometPaymentBll        bll     = new IncometPaymentBll();

            using (List <IncometPaymentModel> .Enumerator enumerator = bll.GetListByWhere(string.Empty).GetEnumerator())
            {
                IncometPaymentModel item;
                while (enumerator.MoveNext())
                {
                    item = enumerator.Current;
                    if (!pTDbsjBll.Exists(item.ID))
                    {
                        int?incomeAlarmDays = (from p in service
                                               where p.ContractId == item.ContractID
                                               select p).FirstOrDefault <ConConfigContract>().IncomeAlarmDays;
                        PTDbsjModel model = new PTDbsjModel {
                            C_OpenFlag = "0",
                            DTM_DBSJ   = DateTime.Now,
                            I_XGID     = item.ID
                        };
                        StringBuilder builder = new StringBuilder();
                        builder.AppendFormat("收款编号为{0}", item.CllectionCode);
                        builder.Append("的合同需要在");
                        builder.Append(incomeAlarmDays);
                        builder.Append("日内付款");
                        model.V_Content = builder.ToString();
                        model.V_DBLJ    = "StockManage/basicset/ShowView.aspx?i=" + item.ID;
                        model.V_LXBM    = "021";
                        model.V_TPLJ    = "new_Mail.gif";
                        model.V_YHDM    = "00000000";
                        pTDbsjBll.Add(model);
                    }
                }
            }
        }
コード例 #13
0
ファイル: PTDbsjBll.cs プロジェクト: zxl881203/src
 public int Update(PTDbsjModel model)
 {
     return(this.dal.Update(model));
 }
コード例 #14
0
ファイル: PTDbsjBll.cs プロジェクト: zxl881203/src
 public int Add(PTDbsjModel model)
 {
     return(this.dal.Add(model));
 }