Exemple #1
0
 public static BillType GetBillType(int billTypeID)
 {
     BillType billType = new BillType();
     int tempInterger;
     string sqlSelect = @"SELECT        BILLTYPEID, TYPENAME
                         FROM            BILLTYPE
                         WHERE        BILLTYPEID=@BILLTYPEID";
     SqlParameter[] sqlParameters = { new SqlParameter("@BILLTYPEID", billTypeID) };
     DataTable dataTable = SqlResult.ExecuteQuery(sqlSelect,sqlParameters);
     if (dataTable.Rows.Count > 0)
     {
         int.TryParse(dataTable.Rows[0][0].ToString(), out tempInterger);
         billType.BillTypeID = tempInterger;
         billType.TypeName = dataTable.Rows[0][1].ToString();
     }
     return billType;
 }
Exemple #2
0
        public static BillType GetBillType(int billTypeID)
        {
            BillType billType = new BillType();
            int      tempInterger;
            string   sqlSelect = @"SELECT        BILLTYPEID, TYPENAME
                                FROM            BILLTYPE
                                WHERE        BILLTYPEID=@BILLTYPEID";

            SqlParameter[] sqlParameters = { new SqlParameter("@BILLTYPEID", billTypeID) };
            DataTable      dataTable     = SqlResult.ExecuteQuery(sqlSelect, sqlParameters);

            if (dataTable.Rows.Count > 0)
            {
                int.TryParse(dataTable.Rows[0][0].ToString(), out tempInterger);
                billType.BillTypeID = tempInterger;
                billType.TypeName   = dataTable.Rows[0][1].ToString();
            }
            return(billType);
        }