Esempio n. 1
0
        public M_ModelField GetModelFromReader(DataRow rdr)
        {
            M_ModelField model = new M_ModelField();

            model.FieldID      = Convert.ToInt32(rdr["FieldID"]);
            model.ModelID      = Convert.ToInt32(rdr["ModelId"]);
            model.FieldName    = ConverToStr(rdr["FieldName"]);
            model.FieldAlias   = ConverToStr(rdr["FieldAlias"]);
            model.FieldTips    = ConverToStr(rdr["FieldTips"]);
            model.Description  = ConverToStr(rdr["Description"]);
            model.IsNotNull    = ConverToBool(rdr["IsNotNull"]);
            model.IsSearchForm = ConverToBool(rdr["IsSearchForm"]);
            model.FieldType    = ConverToStr(rdr["FieldType"]);
            model.Content      = ConverToStr(rdr["Content"]);
            model.OrderID      = ConvertToInt(rdr["OrderId"]);
            model.ShowList     = ConverToBool(rdr["ShowList"]);
            model.ShowWidth    = ConvertToInt(rdr["ShowWidth"]);
            model.IsShow       = ConverToBool(rdr["IsShow"]);
            model.IsView       = ConverToBool(rdr["IsView"]);
            try
            {
                model.IsDownField  = ConvertToInt(rdr["IsDownField"]);
                model.DownServerID = ConvertToInt(rdr["DownServerID"]);
                model.RestoreField = ConvertToInt(rdr["RestoreField"]);
                model.Sys_type     = ConverToBool(rdr["Sys_type"]);
                model.IsCopy       = ConvertToInt(rdr["IsCopy"]);
                model.Islotsize    = ConverToBool(rdr["Islotsize"]);
                model.IsChain      = ConverToBool(rdr["IsChain"]);
            }
            catch { }
            return(model);
        }
Esempio n. 2
0
        public override SqlParameter[] GetParameters()
        {
            M_ModelField model = this;

            SqlParameter[] sp = GetSP();
            sp[0].Value  = model.FieldID;
            sp[1].Value  = model.ModelID;
            sp[2].Value  = model.FieldName;
            sp[3].Value  = model.FieldAlias;
            sp[4].Value  = model.FieldTips;
            sp[5].Value  = model.Description;
            sp[6].Value  = model.IsNotNull;
            sp[7].Value  = model.IsSearchForm;
            sp[8].Value  = model.FieldType;
            sp[9].Value  = model.Content;
            sp[10].Value = model.OrderID;
            sp[11].Value = model.ShowList;
            sp[12].Value = model.ShowWidth;
            sp[13].Value = model.IsShow;
            sp[14].Value = model.IsView;
            sp[15].Value = model.IsDownField;
            sp[16].Value = model.DownServerID;
            sp[17].Value = model.RestoreField;
            sp[18].Value = model.Sys_type;
            sp[19].Value = model.IsCopy;
            sp[20].Value = model.Islotsize;
            sp[21].Value = model.IsChain;
            return(sp);
        }