Exemple #1
0
 public int GetId(string ItemName, string ItemValue)
 {
     DAL.DbManager.DbQuery dquery = new DAL.DbManager.DbQuery("prcGetId");
     dquery.AddVarcharParam("@ItemName", 15, ItemName);
     dquery.AddVarcharParam("@ItemValue", 50, ItemValue);
     return(Convert.ToInt32(dquery.GetScalar()));
 }
Exemple #2
0
        public bool IsUnique(string tableName, string colName, string val)
        {
            DAL.DbManager.DbQuery dquery = new DAL.DbManager.DbQuery("Select count(*) from " + tableName + " where " + colName + " = '" + val + "'", true);
            bool returnval = false;

            try
            {
                returnval = Convert.ToInt32(dquery.GetScalar()) > 0 ? false : true;
            }
            catch (Exception)
            {
            }

            return(returnval);
        }
Exemple #3
0
 public int InvoiceDateCheck(DateTime dt)
 {
     DAL.DbManager.DbQuery dquery = new DAL.DbManager.DbQuery("prcInvoiceDateCheck");
     dquery.AddDateTimeParam("@StaxDate", dt);
     return(Convert.ToInt32(dquery.GetScalar()));
 }
Exemple #4
0
 public decimal GetExchnageRate(DateTime dt)
 {
     DAL.DbManager.DbQuery dquery = new DAL.DbManager.DbQuery("prcGetExchnageRate");
     dquery.AddDateTimeParam("@Exdate", dt);
     return(Convert.ToDecimal(dquery.GetScalar()));
 }