Esempio n. 1
0
        public M_MisApproval GetModelFromReader(DbDataReader rdr)
        {
            M_MisApproval model = new M_MisApproval();

            model.ID          = ConvertToInt(rdr["ID"]);
            model.Inputer     = rdr["Inputer"].ToString();
            model.department  = rdr["department"].ToString();
            model.PID         = ConvertToInt(rdr["PID"]);
            model.content     = rdr["content"].ToString();
            model.Approver    = rdr["Approver"].ToString();
            model.CreateTime  = ConvertToDate(rdr["CreateTime"].ToString());
            model.Results     = ConvertToInt(rdr["Results"].ToString());
            model.Send        = rdr["Send"].ToString();
            model.ProcedureID = ConvertToInt(rdr["ProcedureID"]);
            rdr.Close();
            rdr.Dispose();
            return(model);
        }
Esempio n. 2
0
        public override SqlParameter[] GetParameters()
        {
            M_MisApproval model = this;

            string[,] strArr = FieldList();
            SqlParameter[] sp = GetSP();
            sp[0].Value = model.ID;
            sp[1].Value = model.Inputer;
            sp[2].Value = model.department;
            sp[3].Value = model.PID;
            sp[4].Value = model.content;
            sp[5].Value = model.Approver;
            sp[6].Value = model.CreateTime;
            sp[7].Value = model.Results;
            sp[8].Value = model.Send;
            sp[9].Value = model.ProcedureID;
            return(sp);
        }