public static string SetCustomerShopFactorCookie(FactorPopUpModel senderobj) { senderobj.SayMyTime = DateTime.Now; EncDec en = new EncDec(); return(en.EncryptText(JsonConvert.SerializeObject(senderobj))); }
public static string SetCoockie(Administrator CoockieOBJ) { CoockieOBJ.SayMyTime = DateTime.Now; EncDec en = new EncDec(); return(en.EncryptText(JsonConvert.SerializeObject(CoockieOBJ))); }
//====================================================End of adminside public static string SetCustomerAUTHCookie(tbl_Customer_Main senderobj) { senderobj.SayMyTime = DateTime.Now; EncDec en = new EncDec(); return(en.EncryptText(JsonConvert.SerializeObject(senderobj))); }
public PPBugReporter(BugTypeFrom TypeFrom, string ER = "") { if (string.IsNullOrEmpty(ER)) { string excep = $"Exception.ToString() : {EXOBJ.ToString()}\n" + $"InnerException.Message Type : {EXOBJ.InnerException.Message}"; } else { excep = $"Exception.ToString() : {ER}"; if (EXOBJ != null) { excep += $"\nExceptionOBJ.ToString() : {EXOBJ.ToString()}\n" + $"InnerException.Message Type : {EXOBJ.InnerException.Message}"; } } string FolderName = Enum.GetName(typeof(BugTypeFrom), TypeFrom); string FromWhere = $"BugIN-{FolderName}"; CodeGenerated = "ERX-" + DateTime.Now.Ticks.ToString(); if (TypeFrom == BugTypeFrom.SQL) { EncDec endc = new EncDec(); PDBC db = new PDBC(); excep += $"\nConnectionString : {endc.EncryptText(db.CNGet)}"; } try { if (Directory.Exists(System.Web.HttpContext.Current.Server.MapPath("~/ErrorLogs"))) { if (Directory.Exists(System.Web.HttpContext.Current.Server.MapPath($"~/ErrorLogs/{FolderName}"))) { File.WriteAllText(System.Web.HttpContext.Current.Server.MapPath($"~/ErrorLogs/{FolderName}/ErrorOn({CodeGenerated}--{FromWhere})-{PersianDateTime.Now.Year}-{PersianDateTime.Now.Month}-{PersianDateTime.Now.Day}-{PersianDateTime.Now.Hour} {PersianDateTime.Now.Minute} {PersianDateTime.Now.Second}.Panda"), excep); } else { Directory.CreateDirectory(System.Web.HttpContext.Current.Server.MapPath($"~/ErrorLogs/{FolderName}")); File.WriteAllText(System.Web.HttpContext.Current.Server.MapPath($"~/ErrorLogs/{FolderName}/ErrorOn({CodeGenerated}--{FromWhere})-{PersianDateTime.Now.Year}-{PersianDateTime.Now.Month}-{PersianDateTime.Now.Day}-{PersianDateTime.Now.Hour} {PersianDateTime.Now.Minute} {PersianDateTime.Now.Second}.Panda"), excep); } } else { Directory.CreateDirectory(System.Web.HttpContext.Current.Server.MapPath("~/ErrorLogs")); Directory.CreateDirectory(System.Web.HttpContext.Current.Server.MapPath($"~/ErrorLogs/{FolderName}")); File.WriteAllText(System.Web.HttpContext.Current.Server.MapPath($"~/ErrorLogs/{FolderName}/ErrorOn({CodeGenerated}--{FromWhere})-{PersianDateTime.Now.Year}-{PersianDateTime.Now.Month}-{PersianDateTime.Now.Day}-{PersianDateTime.Now.Hour} {PersianDateTime.Now.Minute} {PersianDateTime.Now.Second}.Panda"), excep); } } catch { } }