Ejemplo n.º 1
0
        public RecieveMsgModel GetModel(Guid InstanceCode)
        {
            StringBuilder builder = new StringBuilder();

            builder.Append("select   ");
            builder.Append(" v_yhdm,InstanceCode,TheOrder,LookUrl,RecieveUserCode,RecieveDate ");
            builder.Append(" from WF_RecieveMsg ");
            builder.Append(" where InstanceCode='" + InstanceCode + "' ");
            RecieveMsgModel model = new RecieveMsgModel();
            DataSet         set   = publicDbOpClass.DataSetQuary(builder.ToString());

            if (set.Tables[0].Rows.Count <= 0)
            {
                return(null);
            }
            model.v_yhdm = set.Tables[0].Rows[0]["v_yhdm"].ToString();
            if (set.Tables[0].Rows[0]["InstanceCode"].ToString() != "")
            {
                model.InstanceCode = new Guid(set.Tables[0].Rows[0]["InstanceCode"].ToString());
            }
            if (set.Tables[0].Rows[0]["TheOrder"].ToString() != "")
            {
                model.TheOrder = new decimal?(decimal.Parse(set.Tables[0].Rows[0]["TheOrder"].ToString()));
            }
            model.LookUrl         = set.Tables[0].Rows[0]["LookUrl"].ToString();
            model.RecieveUserCode = set.Tables[0].Rows[0]["RecieveUserCode"].ToString();
            if (set.Tables[0].Rows[0]["RecieveDate"].ToString() != "")
            {
                model.RecieveDate = DateTime.Parse(set.Tables[0].Rows[0]["RecieveDate"].ToString());
            }
            return(model);
        }
Ejemplo n.º 2
0
        public int Add(RecieveMsgModel model)
        {
            StringBuilder builder = new StringBuilder();

            builder.Append(" begin");
            builder.Append(" insert into WF_RecieveMsg(");
            builder.Append("v_yhdm,InstanceCode,TheOrder,LookUrl,RecieveUserCode,RecieveDate");
            builder.Append(")");
            builder.Append(" values (");
            builder.Append("'" + model.v_yhdm + "',");
            builder.Append("'" + model.InstanceCode + "',");
            builder.Append(model.TheOrder + ",");
            builder.Append("'" + model.LookUrl + "',");
            builder.Append("'" + model.RecieveUserCode + "',");
            builder.Append("'" + model.RecieveDate + "'");
            builder.Append(")");
            builder.Append(";select @@IDENTITY");
            builder.Append(" end");
            object obj2 = publicDbOpClass.ExecuteScalar(builder.ToString());

            if (obj2 != null)
            {
                this.getPTDBSJ(obj2.ToString(), model.LookUrl, model.v_yhdm);
                return(1);
            }
            return(0);
        }
Ejemplo n.º 3
0
    private void RecieveMsgAdd(string usercode)
    {
        RecieveMsgModel recieveMsgModel = new RecieveMsgModel();

        recieveMsgModel.v_yhdm          = usercode;
        recieveMsgModel.TheOrder        = new decimal?(1m);
        recieveMsgModel.LookUrl         = this.txtContent.Text;
        recieveMsgModel.InstanceCode    = this.InstanceCode;
        recieveMsgModel.RecieveDate     = System.DateTime.Now;
        recieveMsgModel.RecieveUserCode = this.Session["yhdm"].ToString();
        this.rma.Add(recieveMsgModel);
    }
Ejemplo n.º 4
0
        public int Update(RecieveMsgModel model)
        {
            StringBuilder builder = new StringBuilder();

            builder.Append("update WF_RecieveMsg set ");
            builder.Append("v_yhdm='" + model.v_yhdm + "',");
            builder.Append("TheOrder=" + model.TheOrder + ",");
            builder.Append("LookUrl='" + model.LookUrl + "'");
            builder.Append("RecieveUserCode='" + model.RecieveUserCode + "',");
            builder.Append("RecieveDate='" + model.RecieveDate + "'");
            builder.Append(" where InstanceCode='" + model.InstanceCode + "' ");
            return(publicDbOpClass.ExecSqlString(builder.ToString()));
        }
Ejemplo n.º 5
0
    private void AddMsg(string usercode)
    {
        RecieveMsgModel recieveMsgModel = new RecieveMsgModel();

        recieveMsgModel.v_yhdm   = usercode;
        recieveMsgModel.TheOrder = new decimal?(1m);
        string text;

        if (this.RBLRoleType.SelectedValue == "-2")
        {
            text = "流程驳回";
        }
        else
        {
            if (this.RBLRoleType.SelectedValue == "1")
            {
                text = "流程通过";
            }
            else
            {
                text = "流程重报";
            }
        }
        DataTable       instanceMain      = FlowAuditAction.GetInstanceMain(this.InstanceID);
        string          businessClassName = FlowAuditAction.GetBusinessClassName(instanceMain.Rows[0]["businesscode"].ToString(), instanceMain.Rows[0]["businessclass"].ToString());
        RecieveMsgModel expr_B1           = recieveMsgModel;
        string          lookUrl           = expr_B1.LookUrl;

        expr_B1.LookUrl = string.Concat(new string[]
        {
            lookUrl,
            businessClassName,
            text,
            "提醒",
            this.txtContent.Value
        });
        recieveMsgModel.InstanceCode    = this.InstanceCode;
        recieveMsgModel.RecieveDate     = System.DateTime.Now;
        recieveMsgModel.RecieveUserCode = this.Session["yhdm"].ToString();
        this.rma.Add(recieveMsgModel);
    }