예제 #1
0
        public M_MisProcedure GetModelFromReader(DbDataReader rdr)
        {
            M_MisProcedure model = new M_MisProcedure();

            model.ID            = Convert.ToInt32(rdr["ID"]);
            model.ProcedureName = ConverToStr(rdr["ProcedureName"]);
            model.TypeID        = ConvertToInt(rdr["TypeID"]);
            model.ClassID       = ConvertToInt(rdr["ClassID"]);
            model.ModelID       = ConverToStr(rdr["ModelID"]);
            model.CommType      = ConvertToInt(rdr["CommType"]);
            model.AllowAttach   = ConvertToInt(rdr["AllowAttach"]);
            model.AllowFlow     = ConvertToInt(rdr["AllowFlow"]);
            model.Remind        = ConverToStr(rdr["Remind"]);
            model.Status        = ConvertToInt(rdr["Status"]);
            model.Sponsor       = ConverToStr(rdr["Sponsor"]);
            model.NodeID        = ConvertToInt(rdr["NodeID"]);
            model.SponsorGroup  = ConverToStr(rdr["SponsorGroup"]);
            model.Manager       = ConverToStr(rdr["Manager"]);
            model.FormType      = ConvertToInt(rdr["FormType"]);
            model.FormInfo      = ConverToStr(rdr["FormInfo"]);
            model.DocAuth       = ConverToStr(rdr["DocAuth"]);
            model.FlowTlp       = ConverToStr(rdr["FlowTlp"]);
            model.PrintTlp      = ConverToStr(rdr["PrintTlp"]);
            try
            {
                model.FirstStep = JsonConvert.DeserializeObject <M_MisProLevel>(ConverToStr(rdr["FirstStep"]));
            }
            catch { }
            if (model.FirstStep == null)
            {
                model.FirstStep = new M_MisProLevel();
            }
            rdr.Dispose();
            return(model);
        }
예제 #2
0
        public override SqlParameter[] GetParameters()
        {
            M_MisProcedure model = this;

            SqlParameter[] sp = GetSP();
            sp[0].Value  = model.ID;
            sp[1].Value  = model.ProcedureName;
            sp[2].Value  = model.TypeID;
            sp[3].Value  = model.ClassID;
            sp[4].Value  = model.ModelID;
            sp[5].Value  = model.CommType;
            sp[6].Value  = model.AllowAttach;
            sp[7].Value  = model.AllowFlow;
            sp[8].Value  = model.Remind;
            sp[9].Value  = model.Status;
            sp[10].Value = model.Sponsor;
            sp[11].Value = model.NodeID;
            sp[12].Value = model.SponsorGroup;
            sp[13].Value = model.Manager;
            sp[14].Value = model.FormType;
            sp[15].Value = model.FormInfo;
            sp[16].Value = model.DocAuth;
            sp[17].Value = model.FlowTlp;
            sp[18].Value = model.PrintTlp;
            sp[19].Value = JsonConvert.SerializeObject(model.FirstStep);
            return(sp);
        }