Exemple #1
0
        public MaterialBackModel getSmRefoundRow(string rcode)
        {
            StringBuilder     builder = new StringBuilder();
            MaterialBackModel model   = new MaterialBackModel();

            builder.Append(" select * from Sm_Refunding where rcode=@rcode");
            SqlParameter[] commandParameters = new SqlParameter[] { new SqlParameter("@rcode", SqlDbType.NVarChar, 50) };
            commandParameters[0].Value = rcode;
            SqlDataReader reader = SqlHelper.ExecuteReader(CommandType.Text, builder.ToString(), commandParameters);

            while (reader.Read())
            {
                model.Rid       = reader.GetString(0);
                model.Rcode     = reader.GetString(1);
                model.Procode   = reader.GetString(2);
                model.Tcode     = reader.GetString(3);
                model.FlowState = reader.GetInt32(4);
                model.IsIn      = reader.GetBoolean(5);
                model.Person    = reader.GetString(6);
                model.InTime    = reader.GetDateTime(7);
                model.Annx      = reader.GetString(8);
                model.Explain   = reader.GetString(9);
            }
            return(model);
        }
Exemple #2
0
        public int Update(MaterialBackModel model)
        {
            StringBuilder builder = new StringBuilder();

            builder.Append("update Sm_Refunding set ");
            builder.Append("rid=@rid,");
            builder.Append("rcode=@rcode,");
            builder.Append("procode=@procode,");
            builder.Append("tcode=@tcode,");
            builder.Append("flowstate=@flowstate,");
            builder.Append("isin=@isin,");
            builder.Append("person=@person,");
            builder.Append("intime=@intime");
            builder.Append("annx=@annx,");
            builder.Append("explain=@explain");
            builder.Append(" where rcode=@rcode ");
            SqlParameter[] commandParameters = new SqlParameter[] { new SqlParameter("@rid", SqlDbType.NVarChar, 50), new SqlParameter("@rcode", SqlDbType.NVarChar, 0x40), new SqlParameter("@procode", SqlDbType.NVarChar, 0x40), new SqlParameter("@tcode", SqlDbType.NVarChar, 0x200), new SqlParameter("@flowstate", SqlDbType.Int, 4), new SqlParameter("@isin", SqlDbType.Bit, 1), new SqlParameter("@person", SqlDbType.NVarChar, 0x40), new SqlParameter("@intime", SqlDbType.SmallDateTime, 8), new SqlParameter("@annx", SqlDbType.NVarChar, 0x80), new SqlParameter("@explain", SqlDbType.NVarChar, 0x800) };
            commandParameters[0].Value = model.Rid;
            commandParameters[1].Value = model.Rcode;
            commandParameters[2].Value = model.Procode;
            commandParameters[3].Value = model.Tcode;
            commandParameters[4].Value = model.FlowState;
            commandParameters[5].Value = model.IsIn;
            commandParameters[6].Value = model.Person;
            commandParameters[7].Value = model.InTime;
            commandParameters[8].Value = model.Annx;
            commandParameters[9].Value = model.Explain;
            return(SqlHelper.ExecuteNonQuery(CommandType.Text, builder.ToString(), commandParameters));
        }
    protected void setControlsValue()
    {
        string rcode = base.Request.QueryString["rcode"];

        this.model                      = this.back.getModel(rcode);
        this.txtCode.Value              = this.model.Rcode;
        this.hdnProCode.Value           = this.model.Procode;
        this.txtPeople.Value            = this.model.Person;
        this.dtxtApplyDate.Text         = this.model.InTime.ToShortDateString();
        this.txtRemark.Value            = this.model.Explain;
        this.FileLink1.MID              = 1081;
        this.FileLink1.FID              = this.txtCode.Value;
        this.FileLink1.Type             = 1;
        this.PickTreasury1.TreasuryCode = this.model.Tcode;
    }
Exemple #4
0
        public int add(MaterialBackModel model)
        {
            StringBuilder builder = new StringBuilder();

            builder.Append(" insert into Sm_Refunding(rid,rcode,procode,tcode,flowstate,isin,person,intime,annx,explain) values(@rid,@rcode,@procode,@tcode,@flowstate,@isin,@person,@intime,@annx,@explain)");
            SqlParameter[] commandParameters = new SqlParameter[] { new SqlParameter("@rid", SqlDbType.NVarChar, 50), new SqlParameter("@rcode", SqlDbType.NVarChar, 0x40), new SqlParameter("@procode", SqlDbType.NVarChar, 0x40), new SqlParameter("@tcode", SqlDbType.NVarChar, 0x200), new SqlParameter("@flowstate", SqlDbType.Int, 4), new SqlParameter("@isin", SqlDbType.Bit, 1), new SqlParameter("@person", SqlDbType.NVarChar, 0x40), new SqlParameter("@intime", SqlDbType.SmallDateTime, 8), new SqlParameter("@annx", SqlDbType.NVarChar, 0x80), new SqlParameter("@explain", SqlDbType.NVarChar, 0x800) };
            commandParameters[0].Value = model.Rid;
            commandParameters[1].Value = model.Rcode;
            commandParameters[2].Value = model.Procode;
            commandParameters[3].Value = model.Tcode;
            commandParameters[4].Value = model.FlowState;
            commandParameters[5].Value = model.IsIn;
            commandParameters[6].Value = model.Person;
            commandParameters[7].Value = model.InTime;
            commandParameters[8].Value = model.Annx;
            commandParameters[9].Value = model.Explain;
            return(SqlHelper.ExecuteNonQuery(CommandType.Text, builder.ToString(), commandParameters));
        }
Exemple #5
0
 public int update(MaterialBackModel model)
 {
     return(this.mtBack.Update(model));
 }
Exemple #6
0
 public int add(MaterialBackModel model)
 {
     return(this.mtBack.add(model));
 }