public void LoadControls() { try { Session["PoDetail"] = null; Session["PoItems"] = null; Session["CurrentDate"] = null; string dateString = BLLDate.GetDateString(0, 0, "_N"); if (dateString != null) { int len = dateString.ToString().Length; Session["CurrentDate"] = dateString.ToString().Substring(0, len - 5); } LoadCategory(); LoadSupplier(); } catch (Exception ex) { throw(ex); } }
protected void Page_Load(object sender, EventArgs e) { Response.ExpiresAbsolute = DateTime.Now.AddDays(-1d); Response.Expires = -1500; Response.CacheControl = "no-cache"; if (Session["Login_User_Detail"] == null) { Response.Redirect("~/MODULES/Login.aspx", true); } user = ((ATTUserLogin)Session["Login_User_Detail"]); orgID = user.OrgID; entryBy = user.UserName; userID = int.Parse(user.PID.ToString()); if (Session["objRqdMsg"] != null) { objRqdMsg = (ATTMessage)Session["objRqdMsg"]; } else { Response.Redirect("MessageInbox.aspx"); } if (!IsPostBack) { Session["LstRplyMsgAttachment"] = null; LoadMsgData(); string dateString = BLLDate.GetDateString(0, 0, "_N"); int len = dateString.Length; TodayDate = dateString.Substring(0, len - 5); Session["LetterDate"] = null; Session["LetterTitle"] = null; Session["LetterBody"] = null; Session["LetterFooter"] = null; } string date = " <p align= right> मिति : " + TodayDate + " </P><br><br>"; LetterDate = date; }
protected void Page_Load(object sender, EventArgs e) { if (this.Page.Master.IsPostBack == false) { if (Session["Login_User_Detail"] != null) { this.GetAllMenuItems(this.LibraryMenu); ATTUserLogin user = ((ATTUserLogin)Session["Login_User_Detail"]); this.headerText1.Text = user.OrgName; Session["NepDate"] = BLLDate.getNepDate(); Session["EngDate"] = BLLDate.getEngDate(); //this.lbldate.Text = (string)Session["NepDate"] + "<BR>" + (string)Session["EngDate"]; } } }
public void LoadControls() { LoadCategory(); Session["grdKnjRow"] = null; Session["lstDak"] = null; Session["DECurrentDate"] = null; string dateString = BLLDate.GetDateString(0, 0, "_N"); if (dateString != null) { int len = dateString.ToString().Length; Session["DECurrentDate"] = dateString.ToString().Substring(0, len - 5); } }
/// <summary> /// بعداز با موفقیت آپلود شدن هر تصویر بانک رو آپلود می کنه /// </summary> /// <param name="Code"></param> public static void UpdateStateAfterSuccessfullUpload_eachImg(Int64 ImgId) { try { string NowDate = UiUtility.FarsiDate_ConvertDMYToYMD(BLLDate.getPersianDate(System.DateTime.Now)) + " " + System.DateTime.Now.TimeOfDay.ToString().Substring(0, 5); using (var context = new AutoClickDBEntities()) { FilesINBarCode x = context.FilesINBarCodes.Where(s => s.FileId == ImgId && s.UploadedDateTime == null).FirstOrDefault(); //age goft oonayi ke ye khata nadashtan faghat =>p.errorr==null x.UploadedDateTime = NowDate; x.UploadedDateTime_G = System.DateTime.Now; context.SaveChanges(); } } catch (Exception ex) { } }
void GetCalender() { int year = int.Parse(this.ddlYear.SelectedValue); int month = int.Parse(this.ddlMonth.SelectedValue); string str = BLLDate.GetDateString(year, month, "_N"); Session["Month"] = str; int days = GetDays(); string[] array = str.Split('/'); int i = GetNoOfSaturdays(int.Parse(array[3]), int.Parse(array[4])); LoadGridHeader(); Session["Saturdays_Date"] = i; }
public void LoadControls() { try { LoadCategory(); Session["objSrchDakhila"] = null; Session["SrchDECurrentDate"] = null; string dateString = BLLDate.GetDateString(0, 0, "_N"); if (dateString != null) { int len = dateString.ToString().Length; Session["SrchDECurrentDate"] = dateString.ToString().Substring(0, len - 5); } } catch (Exception ex) { throw(ex); } }
public void LoadControls() { try { LoadOrganisation(); LoadVenue(); LoadPerson(); string dateString = BLLDate.GetDateString(0, 0, "_N"); if (Session["UpNowDate"] == null) { Session["UpdNowDate"] = dateString; } } catch (Exception ex) { this.lblStatusMessageTitle.Text = "Error Status"; this.lblStatusMessage.Text = ex.Message; this.programmaticModalPopup.Show(); } }
/// <summary> /// بعداز زدن دکمه ثبت نهایی در صورت موفقیت آمیز بودن همه عکس های کد رو یه جا آپدیت می کنه /// </summary> public static void UpdateStateAfterSuccessfullUpload(double Code) { try { string NowDate = UiUtility.FarsiDate_ConvertDMYToYMD(BLLDate.getPersianDate(System.DateTime.Now)) + " " + System.DateTime.Now.TimeOfDay.ToString().Substring(0, 5); using (var context = new AutoClickDBEntities()) { ImagesHistory ImagesHistoryOb = new ImagesHistory(); ImagesHistoryOb.BarCodeData.کد_تفضیلی = Code; ImagesHistoryOb.SuccessfulUploadDateTime = NowDate; context.ImagesHistories.Add(ImagesHistoryOb); List <FilesINBarCode> x = context.FilesINBarCodes.Where(s => s.FK_Barcode == Code && s.UploadedDateTime == null).ToList(); //age goft oonayi ke ye khata nadashtan faghat =>p.errorr==null x.ForEach(s => { s.UploadedDateTime = NowDate; s.UploadedDateTime_G = System.DateTime.Now; }); context.SaveChanges(); } } catch (Exception ex) { } }
public void LoadCurrentDate() { try { string dateString = BLLDate.GetDateString(0, 0, "_N"); string currentDate; int len; if (dateString != null) { len = dateString.ToString().Length; currentDate = dateString.ToString().Substring(0, len - 5); txtApproveDate_URDT_appv.Text = currentDate; } } catch (Exception ex) { throw (ex); } }
void LoadCurrentMonthDate() { try { string dateString = BLLDate.GetDateString(0, 0, "_N"); char[] token = { '/' }; string year = dateString.Split(token)[0]; string month = dateString.Split(token)[1]; string fday = dateString.Split(token)[2]; string lday = dateString.Split(token)[4]; string sDate = year + "/" + this.FormatString(month) + "/" + "01"; string eDate = year + "/" + this.FormatString(month) + "/" + this.FormatString(lday); this.txtFromDate.Text = sDate; this.txtToDate.Text = eDate; } catch (Exception ex) { throw ex; } }
/// <summary> /// برای یک کلاینت یه تعداد تصویر رو رزرو می کنه /// </summary> /// <param name="Moghoofeh"></param> /// <param name="Related_ClassesIds"></param> /// <param name="ClientInfo"></param> /// <param name="cnt"></param> public static void Reserve_Client(bool Moghoofeh, List <int> Related_ClassesIds, string ClientInfo, int cnt) { try { string CodePre = Moghoofeh ? "1" : "2"; string NowDate = UiUtility.FarsiDate_ConvertDMYToYMD(BLLDate.getPersianDate(System.DateTime.Now)) + " " + System.DateTime.Now.TimeOfDay.ToString().Substring(0, 5); using (var context = new AutoClickDBEntities()) { List <double> dd = context.FilesINBarCodes.Where(s => s.UploadedDateTime == null && Related_ClassesIds.Contains(s.FK_FileClass)) .Select (p => p.FK_Barcode).Distinct().ToList().Where(x => x.ToString().StartsWith(CodePre)).Take(cnt).ToList(); List <FilesINBarCode> ReservedList = context.FilesINBarCodes.Where(s => dd.Contains(s.FK_Barcode) && s.UploadedDateTime == null && Related_ClassesIds.Contains(s.FK_FileClass)).ToList(); ReservedList.ForEach(s => { s.ReservedDateTime_G = System.DateTime.Now; s.ReservedDateTime = NowDate; s.ReservedFor = ClientInfo; }); context.SaveChanges(); } } catch (Exception ex) { } }
/// <summary> /// بعد از زدن دکمه ثبت نهایی در صورت بروز خطا /// </summary> /// <param name="Code"></param> public static void UpdateStateAfterErrorAccurance(double Code, string GlobalErrorInUploadMessage, string ErrorMessage) { try { string NowDate = UiUtility.FarsiDate_ConvertDMYToYMD(BLLDate.getPersianDate(System.DateTime.Now)); using (var context = new AutoClickDBEntities()) { ImagesHistory ImagesHistoryOb = new ImagesHistory(); ImagesHistoryOb.BarCodeData.کد_تفضیلی = Code; ImagesHistoryOb.GlobalErrorInUploadDateTime = NowDate; ImagesHistoryOb.GlobalErrorInUploadMessage = GlobalErrorInUploadMessage + " تاریخ: " + NowDate; context.ImagesHistories.Add(ImagesHistoryOb); List <FilesINBarCode> x = context.FilesINBarCodes.Where(s => s.FK_Barcode == Code && s.UploadedDateTime == null).ToList(); //age goft oonayi ke ye khata nadashtan faghat =>p.errorr==null x.ForEach(s => s.ErrorMessage = ErrorMessage + " تاریخ: " + NowDate); context.SaveChanges(); } } catch (Exception ex) { } }
public void LoadControls() { try { this.LoadOrganisation(); this.LoadPerson(); this.LoadVenue(); this.LoadResources(); string dateString = BLLDate.GetDateString(0, 0, "_N"); if (Session["NowDate"] == null) { Session["NowDate"] = dateString; } SetFilteredVenue(); SetFilteredPerson(); } catch (Exception ex) { throw(ex); } }
public void LoadCurrentDate() { try { string dateString = BLLDate.GetDateString(0, 0, "_N"); string currentDate; int len; TextBox txtRecomendDate_RDT = (TextBox)this.PurposeOrderDetail.FindControl("txtRecomendDate_RDT"); if (dateString != null) { len = dateString.ToString().Length; currentDate = dateString.ToString().Substring(0, len - 5); txtRecomendDate_RDT.Text = currentDate; } } catch (Exception ex) { throw(ex); } }