public Model.TT_MonitorLoadWeight DataRowToModel(DataRow row)
 {
     TDTK.PlatForm.MVC4.Model.TT_MonitorLoadWeight model = new TDTK.PlatForm.MVC4.Model.TT_MonitorLoadWeight();
     if (row != null)
     {
         if (row["MonitorCode"] != null && row["MonitorCode"].ToString() != "")
         {
             model.MonitorCode = long.Parse(row["MonitorCode"].ToString());
         }
         if (row["MonitorName"] != null)
         {
             model.MonitorName = row["MonitorName"].ToString();
         }
         if (row["ChineseName"] != null)
         {
             model.ChineseName = row["ChineseName"].ToString();
         }
         if (row["IsCancel"] != null && row["IsCancel"].ToString() != "")
         {
             model.IsCancel = int.Parse(row["IsCancel"].ToString());
         }
     }
     return model;
 }
        public Model.TT_MonitorLoadWeight GetModel(Model.TT_MonitorLoadWeight t)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("select  top 1 MonitorCode,MonitorName,ChineseName,IsCancel from TT_MonitorLoadWeight ");
            strSql.Append(" where MonitorCode=@MonitorCode");
            SqlParameter[] parameters = {
					new SqlParameter("@MonitorCode", SqlDbType.BigInt)
			};
            parameters[0].Value = t.MonitorCode;

            TDTK.PlatForm.MVC4.Model.TT_MonitorLoadWeight model = new TDTK.PlatForm.MVC4.Model.TT_MonitorLoadWeight();
            DataSet ds = DbHelperSQL.Query(strSql.ToString(), parameters);
            if (ds.Tables[0].Rows.Count > 0)
            {
                return DataRowToModel(ds.Tables[0].Rows[0]);
            }
            else
            {
                return null;
            }
        }