public bool AddValue(string colName, String_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 || attr.Value == null) { sp.Value = DBNull.Value; } else { sp.Value = attr.Value; } sp.SqlDbType = SqlDbType.NVarChar; this.col_val_dic[colName] = sp; return(true); }
public StrAttr_UserControl(string name, String_attr attr, bool readOnly = false) { this.InitializeComponent(); this.name_label.Text = name; this.strAttr = attr; this.Refresh_Data(); this.ReadOnly_flag = readOnly; }
public bool AddValue(string colName, String_attr attr) { if (attr == null) { return(false); } if (attr.IsNull_flag) { return(false); } return(this.AddValue(colName, attr.Value)); }
public void GetString(string colName, String_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 = temp_obj.ToString(); } }