Esempio n. 1
0
        public Int32 CheckMailExist(string reportId)
        {
            ConnectionManager conManager = new ConnectionManager(ConName);

            Int32 ID = 0;
            try
            {
                String sql = "GetReportID " + reportId;
                Object id = conManager.ExecuteScalarWrapper(sql);
                ID = Convert.ToInt32(id);
            }
            catch (Exception ex)
            {
                throw (ex);
            }
            finally
            {
                if (conManager.IsNotNull())
                {
                    conManager.Dispose();
                }
            }
            return ID;
        }
Esempio n. 2
0
 public static Decimal GetAllAcc_VoucherDet(Int32 orgKey, string fromDate, string toDate, Int32 head,string spName)
 {
     ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
     Decimal balance = 0.0M;
     string search = "";
     search = head + "," + orgKey + ",'" + fromDate + "','" + toDate+"'";
     try
     {
         String sql = "EXEC "+spName+" "+ search + "";
         Object oppBal = conManager.ExecuteScalarWrapper(sql);
         balance = Convert.ToDecimal(oppBal);
     }
     catch (Exception ex)
     {
         throw (ex);
     }
     finally
     {
         if (conManager.IsNotNull())
         {
             conManager.Dispose();
         }
     }
     return balance;
 }
Esempio n. 3
0
        public static String GetHKName(Int32 HKID)
        {
            ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);

            String HKName = "";
            try
            {
                String sql = "select HKName from HouseKeepingValue Where  HKID=" + HKID;
                Object Name = conManager.ExecuteScalarWrapper(sql);
                HKName = Convert.ToString(Name);
            }
            catch (Exception ex)
            {
                throw (ex);
            }
            finally
            {
                if (conManager.IsNotNull())
                {
                    conManager.Dispose();
                }
            }
            return HKName;
        }