Пример #1
0
        public bool AddValue(string colName, Bool_attr attr)
        {
            if (attr == null)
            {
                return(false);
            }
            if (this.template == null || !this.template.Exist_colName(colName, false))
            {
                return(false);
            }

            SqlParameter sp = new SqlParameter();

            if (attr.IsNull_flag)
            {
                sp.Value = DBNull.Value;
            }
            else
            {
                sp.Value = attr.Value;
            }

            sp.SqlDbType = SqlDbType.Bit;
            this.col_val_dic[colName] = sp;

            return(true);
        }
Пример #2
0
        public BoolAttr_UserControl(string name, Bool_attr attr, bool readOnly = false)
        {
            this.InitializeComponent();
            this.value_checkBox.Text = name;
            this.boolAttr            = attr;

            this.Refresh_Data();
            this.ReadOnly_flag = readOnly;
        }
Пример #3
0
 public bool AddValue(string colName, Bool_attr attr)
 {
     if (attr == null)
     {
         return(false);
     }
     if (attr.IsNull_flag)
     {
         return(false);
     }
     return(this.AddValue(colName, attr.Value));
 }
Пример #4
0
        public void GetBool(string colName, Bool_attr attr)
        {
            if (attr == null)
            {
                return;
            }
            if (!this.Check_getCol(colName))
            {
                return;
            }

            object temp_obj = this.reader[colName];

            if (temp_obj == DBNull.Value)
            {
                attr.IsNull_flag = true;
            }
            else
            {
                attr.Value = (bool)temp_obj;
            }
        }