Exemple #1
0
        public bool AddLowBalanceRecovery(int RecoveryId)
        {
            try
            {
                //using (var db = new SoneriCISEntities())
                //{
                //    tbl_Recovery_Low_Balance row = new tbl_Recovery_Low_Balance();
                //    row.RecoveryID = RequsetId;
                //    row.RecoveryDate = DateTime.Now;
                //    db.tbl_Recovery_Low_Balance.Add(row);
                //    db.SaveChanges();
                //}
                //return true;
                List <SqlParameter> param = new List <SqlParameter>();
                param.Add(new SqlParameter("@RecoveryId", RecoveryId));


                var success = Convert.ToString(DatabaseGateway.GetScalarDataUsingStoredProcedure("sp_Add_Recovery_Low_Balance", param));

                return(true);
            }
            catch (Exception ex)
            {
                return(false);
            }
        }
Exemple #2
0
        public bool InsertNewRecovery(DateTime StartDate, DateTime EndDate)
        {
            List <SqlParameter> param = new List <SqlParameter>();

            param.Add(new SqlParameter("@Date", StartDate));
            param.Add(new SqlParameter("@ToDate", EndDate));

            var success = Convert.ToString(DatabaseGateway.GetScalarDataUsingStoredProcedure("sp_Insert_New_Recovery_Records_Count", param));

            return(true);
        }
Exemple #3
0
        public static bool AddUserLog(int UserId, long?EntityId = null)
        {
            List <SqlParameter> param = new List <SqlParameter>();

            param.Add(new SqlParameter("@EventName", "l"));
            param.Add(new SqlParameter("@EntityName", "Login"));
            param.Add(new SqlParameter("@EntityID", EntityId));
            param.Add(new SqlParameter("@UserId", UserId));

            var success = Convert.ToString(DatabaseGateway.GetScalarDataUsingStoredProcedure("sp_AddUserLog", param));

            return(true);
        }
Exemple #4
0
 public bool AddUserLog(string json, string entityName, string eventName, string entityId)
 {
     try
     {
         List <SqlParameter> param = new List <SqlParameter>();
         param.Add(new SqlParameter("@EventName", eventName));
         param.Add(new SqlParameter("@EntityName", entityName));
         param.Add(new SqlParameter("@EntityID", entityId));
         param.Add(new SqlParameter("@UserId", int.Parse(Convert.ToString(HttpContext.Current.Session["UserId"]))));
         param.Add(new SqlParameter("@Description", json));
         var success = DatabaseGateway.GetScalarDataUsingStoredProcedure("sp_AddUserLog", param);
         return(true);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }