public static Int32 chkduplicateparameter(MetaDataEntity objm) { DbCommand cmd = BaseDb.CreateStrCommand(); cmd.CommandText = "select count(*) from DATAPARAMETER where parameterid='" + objm.getparameter + "'"; int chk = Convert.ToInt32(BaseDb.ExecuteScalar(cmd)); return(chk); }
public static Int32 chkduplicatedata(MetaDataEntity objm, string type) { DbCommand cmd = BaseDb.CreateStrCommand(); cmd.CommandText = "select count(*) from avlbldatadet where realstat='" + objm.Getstation + "' and parameterid='" + objm.getparameter + "' and type='" + type + "'"; int chk = Convert.ToInt32(BaseDb.ExecuteScalar(cmd)); return(chk); }
public static Int32 chkduplicatelocation(MetaDataEntity objm) { DbCommand cmd = BaseDb.CreateStrCommand(); cmd.CommandText = "select count(*) from Location where realstat='" + objm.Getrealstationname + "'"; int chk = Convert.ToInt32(BaseDb.ExecuteScalar(cmd).ToString()); return(chk); }
public static int updatedatadescription(MetaDataEntity objm, string parameterid) { DbCommand cmd = BaseDb.CreatetmpCommand(); cmd.CommandText = "update dataparameter set parameterdesc='" + objm.getparameter + "' where parameterid='" + parameterid + "'"; int error = -1; try { BaseDb.ExecuteNonQuery(cmd); error = 0; return(error); } catch (Exception ex) { throw (ex); } finally { } }