Пример #1
0
 public M_MisProcedure()
 {
     FirstStep   = new M_MisProLevel();
     AllowFlow   = 1;
     AllowAttach = 1;
     NodeID      = 0;//绑定节点,暂无用
 }
Пример #2
0
        public override SqlParameter[] GetParameters()
        {
            M_MisProLevel model = this;

            if (string.IsNullOrEmpty(model.DocAuth))
            {
                model.DocAuth = "all";
            }
            if (model.CreateTime <= DateTime.MinValue)
            {
                model.CreateTime = DateTime.Now;
            }
            if (model.StepAuth == null)
            {
                model.StepAuth = new M_OA_StepAuth();
            }
            SqlParameter[] sp = GetSP();
            sp[0].Value  = model.ID;
            sp[1].Value  = model.ProID;
            sp[2].Value  = model.stepNum;
            sp[3].Value  = model.stepName;
            sp[4].Value  = model.ReferUser;
            sp[5].Value  = model.CCUser;
            sp[6].Value  = model.HQoption;
            sp[7].Value  = model.Qzzjoption;
            sp[8].Value  = model.HToption;
            sp[9].Value  = model.EmailAlert;
            sp[10].Value = model.SmsAlert;
            sp[11].Value = model.BackOption;
            sp[12].Value = model.PublicAttachOption;
            sp[13].Value = model.PrivateAttachOption;
            sp[14].Value = model.Status;
            sp[15].Value = model.CreateTime;
            sp[16].Value = model.Remind;
            sp[17].Value = model.SendMan;
            sp[18].Value = model.ReferGroup;
            sp[19].Value = model.CCGroup;
            sp[20].Value = model.EmailGroup;
            sp[21].Value = model.SmsGroup;
            sp[22].Value = model.CanEditField;
            sp[23].Value = model.DocAuth;
            sp[24].Value = model.ReferUser_Alias;
            sp[25].Value = model.CCUser_Alias;
            sp[26].Value = model.CCUser_Allow;
            sp[27].Value = model.NextOP;
            sp[28].Value = model.HelpUser_Alias;
            sp[29].Value = model.HelpUser_Allow;
            sp[30].Value = model.HelpUser;
            sp[31].Value = JsonConvert.SerializeObject(model.StepAuth);
            sp[32].Value = model.ParentID;
            sp[33].Value = model.OrginStepID;
            return(sp);
        }
Пример #3
0
        public M_MisProLevel GetModelFromReader(DbDataReader rdr)
        {
            M_MisProLevel model = new M_MisProLevel();

            model.ID                  = Convert.ToInt32(rdr["ID"]);
            model.ProID               = Convert.ToInt32(rdr["ProID"]);
            model.stepNum             = ConvertToInt(rdr["stepNum"]);
            model.stepName            = ConverToStr(rdr["stepName"]);
            model.ReferUser           = ConverToStr(rdr["ReferUser"]);
            model.CCUser              = ConverToStr(rdr["CCUser"]);
            model.HQoption            = ConvertToInt(rdr["HQoption"]);
            model.Qzzjoption          = ConvertToInt(rdr["Qzzjoption"]);
            model.HToption            = ConvertToInt(rdr["HToption"]);
            model.EmailAlert          = ConverToStr(rdr["EmailAlert"]);
            model.SmsAlert            = ConverToStr(rdr["SmsAlert"]);
            model.BackOption          = ConvertToInt(rdr["BackOption"]);
            model.PublicAttachOption  = ConvertToInt(rdr["PublicAttachOption"]);
            model.PrivateAttachOption = ConvertToInt(rdr["PrivateAttachOption"]);
            model.Status              = ConvertToInt(rdr["Status"]);
            model.CreateTime          = ConvertToDate(rdr["CreateTime"]);
            model.Remind              = ConverToStr(rdr["Remind"]);
            model.SendMan             = ConverToStr(rdr["SendMan"]);
            model.ReferGroup          = ConverToStr(rdr["ReferGroup"]);
            model.CCGroup             = ConverToStr(rdr["CCGroup"]);
            model.EmailGroup          = ConverToStr(rdr["EmailGroup"]);
            model.SmsGroup            = ConverToStr(rdr["SmsGroup"]);
            model.CanEditField        = ConverToStr(rdr["CanEditField"]);
            model.DocAuth             = ConverToStr(rdr["DocAuth"]);
            model.ReferUser_Alias     = ConverToStr(rdr["ReferUser_Alias"]);
            model.CCUser_Alias        = ConverToStr(rdr["CCUser_Alias"]);
            model.CCUser_Allow        = ConvertToInt(rdr["CCUser_Allow"]);
            model.NextOP              = ConverToStr(rdr["NextOP"]);
            model.HelpUser_Alias      = ConverToStr(rdr["HelpUser_Alias"]);
            model.HelpUser_Allow      = ConvertToInt(rdr["HelpUser_Allow"]);
            model.HelpUser            = ConverToStr(rdr["HelpUser"]);
            model.StepAuth            = string.IsNullOrEmpty(ConverToStr(rdr["StepAuth"])) ? new M_OA_StepAuth() : JsonConvert.DeserializeObject <M_OA_StepAuth>(ConverToStr(rdr["StepAuth"]));
            model.ParentID            = ConvertToInt(rdr["ParentID"]);
            model.OrginStepID         = ConvertToInt(rdr["OrginStepID"]);
            rdr.Close();
            return(model);
        }