// 外部锁_allMemberMutex private JieriGiveKingItemData GetClientGiveKingInfo(GameClient client, out bool bLoadFromDb) { bLoadFromDb = false; JieriGiveKingItemData item = null; if (!giveDict.TryGetValue(client.ClientData.RoleID, out item)) { string cmd = string.Format("{0}:{1}:{2}", client.ClientData.RoleID, FromDate.Replace(':', '$'), ToDate.Replace(':', '$')); item = Global.sendToDB <JieriGiveKingItemData, string>((int)TCPGameServerCmds.CMD_DB_LOAD_ROLE_JIERI_GIVE_KING, cmd, client.ServerId); if (item == null) { item = new JieriGiveKingItemData(); item.RoleID = client.ClientData.RoleID; item.Rolename = client.ClientData.RoleName; item.TotalGive = 0; item.Rank = -1; item.GetAwardTimes = 0; } else { bLoadFromDb = true; } giveDict[client.ClientData.RoleID] = item; } return(item); }
private void FillChartInhabitants(string title, Func <ModelData.RegionData, float> dataToExtract) { var dateFrom = FromDate?.Invoke() ?? DateTime.Today; var dateTo = ToDate?.Invoke() ?? DateTime.Today; var top = Top?.Invoke()?.value ?? 5; var data = DataExtractorRegion.FillRangeDataInhabitants(dateFrom, dateTo, top, dataToExtract); Title = dateFrom.Date == dateTo.Date ? $"{title} {dateFrom.Date.ToShortDateString()}" : $"{title} {Properties.Resources.BetweenDate} {dateFrom.Date:dd/MM/yy} {Properties.Resources.And} {dateTo.Date:dd/MM/yy}"; Func <ChartPoint, string> labelPoint = chartPoint => string.Format("{0}", chartPoint.Y.ToString("#,##0.##")); var series = new SeriesCollection(); foreach (var region in data) { series.Add( new PieSeries() { Title = region.lbl, Values = new ChartValues <float> { region.value }, DataLabels = true, LabelPoint = labelPoint }); } this.chart.Series = series; this.chart.LegendLocation = LegendLocation.Right; }
public override DateTime?GetNextExecuteTimeAfterSpecificTime(DateTime time) { if (time > ToDate) { return(default(DateTime?)); } if (time < FromDate) { time = FromDate; } DateTime fromDate = FromDate.AddDays(DayOfWeek.Sunday - FromDate.DayOfWeek).Date; DateTime nowDate = time.AddDays(DayOfWeek.Sunday - time.DayOfWeek).Date; int diff = nowDate.Subtract(fromDate).Days; int x = diff % (m_IntervalWeeks * 7); DateTime rst; if (x != 0) { rst = nowDate.AddDays(m_IntervalWeeks * 7 - x); } else { rst = nowDate; } rst.AddDays(ExecuteWeekDay - rst.DayOfWeek); rst = new DateTime(rst.Year, rst.Month, rst.Day).Add(TimeSpan.Parse(ExecuteTime)); if (rst < time) { rst = rst.AddDays(m_IntervalWeeks * 7); } return(rst); }
private void OnMakeEntryOrder() { // Where need to save new entry order var wherePath = Service.GetDirectory(); if (wherePath != null) { // Put data to model var entryOrder = new EntryOrder(); entryOrder.fromDate = FromDate.ToShortDateString(); //entryOrder.brokerClient = ClientBroker.name; entryOrder.lotNumber = LotNumber; entryOrder.memberCode = ClientBroker.code; entryOrder.fullMemberName = ClientBroker.name; entryOrder.clientCode = JournalC01CompanyInfo.code; entryOrder.clientFullName = ""; entryOrder.clientAddress = ""; entryOrder.clientBIN = JournalC01CompanyInfo.bin; entryOrder.clientPhones = ""; entryOrder.clientBankIIK = ""; entryOrder.clientBankBIK = ""; entryOrder.clientBankName = ""; entryOrder.requestedDocs = new List <RequestedDoc>(ReqDocList); // Give model and path to service var entryOrderService = new EntryOrderService(entryOrder, wherePath.FullName); entryOrderService.CopyTemplateToEndPath(); // Fill and save template entryOrderService.FillFileAndSave(); // Close and show folder Process.Start("explorer", wherePath.FullName); } }
public IEnumerable <ValidationResult> Validate(ValidationContext validationContext) { if (FromDate.AsDateTime() > ToDate.AsDateTime()) { yield return(new ValidationResult(ReportInputParametersResources.FromDateBeforeToDate, new[] { "FromDate" })); } if (string.IsNullOrEmpty(SelectedTextField) || SelectedTextField != "-1") { if (string.IsNullOrEmpty(SelectedTextField)) { yield return (new ValidationResult(ReportInputParametersResources.TextFieldRequired, new[] { "SelectedTextField" })); } if (!string.IsNullOrEmpty(SelectedTextField) && string.IsNullOrEmpty(SelectedOperator)) { yield return (new ValidationResult(ReportInputParametersResources.TextFieldOperatorRequired, new[] { "SelectedOperator" })); } if (!string.IsNullOrEmpty(SelectedTextField) && string.IsNullOrEmpty(TextSearch)) { yield return (new ValidationResult(ReportInputParametersResources.TextSearchRequired, new[] { "TextSearch" })); } } }
public bool IsValid() { var oErrors = new List <string>(); if (ToDate <= FromDate) { oErrors.Add("Period final date is less than period start date in " + FromDate.ToString("dd-MM-yyyy", CultureInfo.InvariantCulture) + " and " + ToDate.ToString("dd-MM-yyyy", CultureInfo.InvariantCulture) + "." ); } // if if (string.IsNullOrWhiteSpace(Period)) { Period = ToDate.ToString("MM yy", CultureInfo.InvariantCulture); } if (DueDate < ToDate) { DueDate = ToDate.AddMonths(1).AddDays(7); } if ((BoxData == null) || (BoxData.Count < 1)) { oErrors.Add("No box data specified."); } Errors = oErrors.ToArray(); return(Errors.Length == 0); } // IsValid
public override int GetHashCode() { int hashCode1 = FromDate == null ? 0 : FromDate.GetHashCode(); int hashCode2 = ToDate == null ? 0 : ToDate.GetHashCode(); return(hashCode1 ^ hashCode2); }
private void FormInit() { this.esiTitle.Text = $@"{FromDate.ToShortDateString()} - {ToDate.ToShortDateString()} [{AccountInfo}] - [{StockCode} - {StockName}] "; if (LoginInfo.CurrentUser.IsAdmin) { //实际受益人 var dealers = _accountService.GetAccountOperatorsByAccountId(AccountId); this.luBeneficiary.Initialize(dealers, "Code", "Name", showHeader: false, showFooter: false); //交易类别 var tradeTypes = this._dictionaryService.GetDictionaryInfoByTypeId((int)EnumLibrary.DictionaryType.TradeType) .Select(x => new ComboBoxItemModel { Text = x.Name, Value = x.Code.ToString(), }).ToList(); this.cbTradeType.Initialize(tradeTypes); } else { lcgLeft.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never; lcgRight.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never; } this.btnCopy.Enabled = false; this.btnDelete_L.Enabled = false; this.btnDelete_R.Enabled = false; this.gridView1.SetLayout(showAutoFilterRow: false, showCheckBoxRowSelect: LoginInfo.CurrentUser.IsAdmin, rowIndicatorWidth: 40); this.gridView2.SetLayout(showAutoFilterRow: false, showCheckBoxRowSelect: LoginInfo.CurrentUser.IsAdmin, rowIndicatorWidth: 40); }
private GetOrdersResponseType GetOrders(int?pageNumber, RequestsCounterData requestsCounter) { var req = new GetOrdersRequestType { CreateTimeFrom = FromDate.ToUniversalTime(), CreateTimeFromSpecified = true, CreateTimeTo = ToDate.ToUniversalTime(), CreateTimeToSpecified = true, Pagination = new PaginationType { EntriesPerPage = 200, EntriesPerPageSpecified = true, PageNumber = pageNumber.HasValue ? pageNumber.Value : 0, PageNumberSpecified = pageNumber.HasValue } }; req.DetailLevel = new[] { DetailLevelCodeType.ReturnAll }; req.IncludeFinalValueFee = true; req.IncludeFinalValueFeeSpecified = true; req.OrderRole = TradingRoleCodeType.Seller; req.OrderRoleSpecified = true; req.OrderStatus = OrderStatusCodeType.All; req.OrderStatusSpecified = true; return(GetOrders(req, requestsCounter)); }
public override string ToString() { string formatString = "yyyy-MM-dd HH:mm"; return("from " + FromDate.DayOfWeek.ToString() + " " + FromDate.ToString(formatString) + " to " + ToDate.DayOfWeek.ToString() + " " + ToDate.ToString(formatString)); }
/// <summary> /// 解析活动时间 /// </summary> public bool ParseActivityTime(string ZhouMoChongZhiTime) { // <!--Mu周末充值时间,开启时间,终止时间,1至7代表周一至周日--> // <Param Name="ZhouMoChongZhiTime" Value="6,00:00:00|7,23:59:59"/> string[] TimeActivity = ZhouMoChongZhiTime.Split('|'); if (TimeActivity == null || TimeActivity.Length != 2) { return(false); } string[] DataBeginSplit = TimeActivity[0].Split(','); string[] DataEndSplit = TimeActivity[1].Split(','); if (DataBeginSplit == null || DataEndSplit == null || DataBeginSplit.Length != 2 || DataEndSplit.Length != 2) { return(false); } // FromDate = DataBeginSplit[0] + ',' + DataBeginSplit[1]; ToDate = DataEndSplit[0] + ',' + DataEndSplit[1]; // 删空格 防止填错 FromDate.Trim(); ToDate.Trim(); return(true); }
// 服务器启动,从db加载前N条 public void LoadRankFromDB() { if (InActivityTime() || InAwardTime()) { string req = string.Format("{0}:{1}:{2}", FromDate.Replace(':', '$'), ToDate.Replace(':', '$'), RANK_LVL_CNT); List <JieriGiveKingItemData> items = Global.sendToDB <List <JieriGiveKingItemData>, string>( (int)TCPGameServerCmds.CMD_DB_LOAD_JIERI_GIVE_KING_RANK, req, GameManager.LocalServerId); lock (_allMemberMutex) { giveDict.Clear(); orderedGiveList.Clear(); if (items == null || items.Count == 0) { return; } foreach (var item in items) { giveDict[item.RoleID] = item; orderedGiveList.Add(item); } buildRankingList(orderedGiveList); } } }
private void ButtonPrint_OnClick(object sender, RoutedEventArgs e) { if (Logs.Count == 0) { MessageBox.Show("No Data."); return; } var myPicturePath = Environment.GetFolderPath(Environment.SpecialFolder.MyPictures); var fileName = string.Format("{0}.jpg", Guid.NewGuid().ToString()); var filePath = System.IO.Path.Combine(myPicturePath, fileName); Chart.ExportToImage(filePath); string itemName = Logs[0].Item.ItemName; var export = new LogExport() { ItemName = itemName, StartDate = FromDate.ToString(), EndDate = ToDate.ToString(), Graph = string.Format("File://{0}", filePath), HashValue = ConcatedHash, Min = Min.ToString(), Max = Max.ToString() }; WindowReport1 windowReport1 = new WindowReport1(); windowReport1.Export = export; windowReport1.ShowDialog(); // clean junk File.Delete(filePath); }
// 检查各各种条件 public override bool CheckCondition(GameClient client, int extTag) { IPointsExchgData ipointsExchgData; if (!AwardItemDict.TryGetValue(extTag, out ipointsExchgData)) { return(false); } // 是否还有领取次数 if (GetIPointsLeftMergeNum(client, extTag) <= 0) { return(false); } // 看充值点还够不够 string strcmd = string.Format("{0}:{1}:{2}", client.ClientData.RoleID, FromDate.Replace(':', '$'), ToDate.Replace(':', '$')); string[] fields = Global.ExecuteDBCmd((int)TCPGameServerCmds.CMD_SPR_GETINPUT_POINTS_EXCHGINFO, strcmd, client.ServerId); if (null == fields || fields.Length < 2) { return(false); } if (Convert.ToInt32(fields[1]) < ipointsExchgData.MinAwardCondionValue) { return(false); } return(true); }
protected override IAsyncResult BeginExecute(AsyncCodeActivityContext context, AsyncCallback callback, object state) { LoadAuthentication(context); if (EnvelopeIDs.Get(context) != null) { Query["envelope_ids"] = EnvelopeIDs.Get(context).Replace(" ", ""); } if (FromDate.Get(context) != DateTime.MinValue) { Query["from_date"] = FromDate.Get(context).ToString("s", System.Globalization.CultureInfo.InvariantCulture) + "Z"; Console.WriteLine("From Date: " + Query["from_date"]); } if (ToDate.Get(context) != DateTime.MinValue) { Query["to_date"] = ToDate.Get(context).ToString("s", System.Globalization.CultureInfo.InvariantCulture) + "Z"; Console.WriteLine("To Date: " + Query["to_date"]); } if (FromToStatus.ToString() != null && FromToStatus.ToString() != "Any") { Query["from_to_status"] = FromToStatus.ToString(); } if (Status.Get(context) != null) { Query["status"] = Status.Get(context).Replace(" ", ""); } GetEnvelopesDelegate = new Action(_ListEnvelopes); return(GetEnvelopesDelegate.BeginInvoke(callback, state)); }
public override ReportParameter[] GetReportParameters(string UserName) { ReportParameter[] param = new ReportParameter[4]; param[0] = new ReportParameter("ReportHeader", "J.A.R.V.I.S. - Job Report"); param[1] = new ReportParameter("DateRange", "Between " + FromDate.ToString("dd MMM yyyy") + " and " + ToDate.ToString("dd MMM yyyy")); param[2] = new ReportParameter("JobStatus", "Completed Jobs"); string searchCriteria = string.Empty; if (CustomerName.Length != 0 || CampaignManagerName.Length != 0 || DeveloperName.Length != 0) { searchCriteria = "Search Filter - "; string str = string.Empty; if (CustomerName.Length > 0) { str += ", " + CustomerName; } if (CampaignManagerName.Length > 0) { str += ", " + CampaignManagerName; } if (DeveloperName.Length > 0) { str += ", " + DeveloperName; } if (str.Substring(0, 1) == ",") { str = str.Substring(2, str.Length - 2); } searchCriteria += str; } param[3] = new ReportParameter("SearchFilter", searchCriteria); return(param); }
public OrderViewModel(int cookerID, string cookerName) { _cookerID = cookerID; _cookerName = cookerName; FromDate = Utility.FirstDateOfWeek(DateTime.Today.Year, Utility.GetWeekOfYear(DateTime.Now), CultureInfo.CurrentCulture); ToDate = FromDate.AddDays(6); LoadData(); }
private bool IsWeekValid(DateTime time) { DateTime fromDate = FromDate.AddDays(DayOfWeek.Sunday - FromDate.DayOfWeek).Date; DateTime nowDate = time.AddDays(DayOfWeek.Sunday - time.DayOfWeek).Date; int diff = nowDate.Subtract(fromDate).Days; return((diff % (m_IntervalWeeks * 7)) == 0); }
private void ExecuteExport(object obj) { GlobalClass.ReportName = "Transaction Activity Log"; GlobalClass.ReportParams = string.Format("From Date : {0} To {1}", FromDate.ToString("MM/dd/yyyy"), ToDate.ToString("MM/dd/yyyy")); wExportFormat ef = new wExportFormat(rv.Report); ef.ShowDialog(); }
public override int GetHashCode() { var hashCode = -1138604303; hashCode = hashCode * -1521134295 + FromDate.GetHashCode(); hashCode = hashCode * -1521134295 + ToDate.GetHashCode(); return(hashCode); }
public JsonResult GetHolidayList() { int totalRow = 0; string fromDate = Request.QueryString["fromDate"]; string toDate = Request.QueryString["toDate"]; DateTime FromDate; DateTime ToDate; if (string.IsNullOrWhiteSpace(fromDate)) { var a = DateTime.Now.AddDays(-30).ToString("yyyy-MM-dd"); FromDate = DateTime.ParseExact(a, "yyyy-MM-dd", System.Globalization.CultureInfo.InvariantCulture); } else { FromDate = DateTime.ParseExact(fromDate, "yyyy-MM-dd", System.Globalization.CultureInfo.InvariantCulture); } if (string.IsNullOrWhiteSpace(toDate)) { ToDate = DateTime.ParseExact(DateTime.Now.ToString("yyyy-MM-dd"), "yyyy-MM-dd", System.Globalization.CultureInfo.InvariantCulture); } else { ToDate = DateTime.ParseExact(toDate, "yyyy-MM-dd", System.Globalization.CultureInfo.InvariantCulture); } var page = GetPagingMessage(Request.QueryString); int result = DateTime.Compare(ToDate, FromDate); if (result < 0) { return(Json(new { status = false, mess = "Ngày bắt đầu không thể lớn hơn ngày kết thúc.", }, JsonRequestBehavior.AllowGet)); } var regulationTime = _iplHoliday.ListHolidayAllPaging(FromDate, ToDate, page.PageIndex, page.PageSize, ref totalRow); ViewBag.FromDate = FromDate.ToString("yyyy-MM-dd"); ViewBag.ToDate = ToDate.ToString("yyyy-MM-dd"); if (regulationTime != null && regulationTime.Count() > 0) { return(Json(new { status = true, rows = regulationTime.ToList(), }, JsonRequestBehavior.AllowGet)); } else { return(Json(new { status = false, mess = "Không tìm thấy dữ liệu.", }, JsonRequestBehavior.AllowGet)); } }
/// <summary> /// 检查是否在活动持续时间内 /// </summary> public override bool InActivityTime() { if (string.IsNullOrEmpty(FromDate) || string.IsNullOrEmpty(ToDate)) { return(false); } int NowDayOfWeek = (int)TimeUtil.NowDateTime().DayOfWeek; string[] DataBeginSplit = FromDate.Split(','); string[] DataEndSplit = ToDate.Split(','); // 将DayOfWeek 0~6 转换成 1~7 if (DayOfWeek.Sunday == (DayOfWeek)NowDayOfWeek) { NowDayOfWeek = 7; } int BeginDayOfWeek = Convert.ToInt32(DataBeginSplit[0]); int EndDayOfWeek = Convert.ToInt32(DataEndSplit[0]); if (NowDayOfWeek < BeginDayOfWeek) { return(false); } else if (NowDayOfWeek > EndDayOfWeek) { return(false); } string nowTime = TimeUtil.NowDateTime().ToString("HH:mm:ss"); // 比较时分秒 if (BeginDayOfWeek == EndDayOfWeek) { if (nowTime.CompareTo(DataBeginSplit[1]) > 0 && nowTime.CompareTo(DataEndSplit[1]) < 0) { return(true); } } else if (NowDayOfWeek == BeginDayOfWeek) { if (nowTime.CompareTo(DataBeginSplit[1]) > 0) { return(true); } } else if (NowDayOfWeek == EndDayOfWeek) { if (nowTime.CompareTo(DataEndSplit[1]) < 0) { return(true); } } // NowDayOfWeek > BeginDayOfWeek && NowDayOfWeek < EndDayOfWeek && BeginDayOfWeek != EndDayOfWeek return(true); }
public override string ToString() { return(Name.ToString() + "\n" + "Id".PadRight(15) + Id + "\n" + "Site Id".PadRight(15) + SiteId + "\n" + "Check-in".PadRight(15) + FromDate.ToShortDateString() + "\n" + "Check-out".PadRight(15) + ToDate.ToShortDateString() + "\n" + "Creation Date".PadRight(15) + CreateDate + "\n"); }
public SingleCookerViewModel(CookerViewModel model) { Cooker = model; cookerID = model.ID; cookerName = model.Name; FromDate = Utility.FirstDateOfWeek(DateTime.Today.Year, Utility.GetWeekOfYear(DateTime.Now), CultureInfo.CurrentCulture); ToDate = FromDate.AddDays(6); FilldData(); }
private void ExecutePrint(object obj) { GlobalClass.ReportName = "Transaction Activity Log"; GlobalClass.ReportParams = string.Format("From Date : {0} To {1}", FromDate.ToString("MM/dd/yyyy"), ToDate.ToString("MM/dd/yyyy")); rv.Report.PrintSettings.PrintPageMargin = new Thickness(30); rv.Report.PrintSettings.AllowColumnWidthFitToPrintPage = false; rv.Report.Print(); }
public void Reset(MiMFa_Date fromDate = null) { if (FromDate != null || fromDate != null) { if (fromDate == null) { FromDate.CopyTo(fromDate); } MiMFa_Date md = new MiMFa_Date(); fromDate.CopyTo(md); FromDate.CopyTo(_ToDate); bool ShowPriod = true; if (_PriodLength < 0) { ToDate.Month++; ToDate.Day = 1; ToDate.Day--; } else if (_PriodLength == 0) { ShowPriod = false; } else { ToDate.Day += (_PriodLength - 1); } md.Day -= fromDate.DayOfWeekNum; PriodList = new List <MiMFa_Date>(); for (int i = 1; i <= 42; i++) { DayCalendar dc = (DayCalendar)__tlp_Main.Controls.Find("dateTime_DayCalendar" + i, false)[0]; MiMFa_Date mm = new MiMFa_Date(); md.CopyTo(mm); dc.Date = mm; if (MouseEvent) { if (md.IsBetween(FromDate, ToDate) && ShowPriod) { PriodList.Add(md); dc.Enabled = true; dc.BackColor = PriodBackColor; } else { dc.Enabled = false; dc.BackColor = AllDayBackColor; } } if (DateAndTime.GetDatePAC().IsSame(md)) { dc.BackColor = TodayBackColor; } md.IncrementDay(); } } }
public override int GetHashCode() { return(PrimaryFolder.GetHashCode() ^ Unread.GetHashCode() ^ Attachments.GetHashCode() ^ PeriodFrom.GetHashCode() ^ PeriodTo.GetHashCode() ^ Important.GetHashCode() ^ FromAddress.GetHashCode() ^ MailboxId.GetHashCode() ^ CustomLabels.GetHashCode() ^ Sort.GetHashCode() ^ SortOrder.GetHashCode() ^ SearchText.GetHashCode() ^ Page.GetValueOrDefault() ^ PageSize.GetHashCode() ^ SetLabel.GetHashCode() ^ WithCalendar.GetHashCode() ^ UserFolderId.GetHashCode() ^ FromDate.GetHashCode() ^ FromMessage.GetHashCode() ^ PrevFlag.GetHashCode()); }
public List <string> GetHeader() { var ret = new List <string>(); ret.Add(String.Format("Дата на извлечението: {0}", DateTime.Now.ToShortDateString())); ret.Add(String.Format("За фирма : {0}", ConfigTempoSinglenton.GetInstance().CurrentFirma.Name)); ret.Add(String.Format("Съставил : {0}", Entrence.UserName)); ret.Add(string.Format("От дата {0} до дата {1}", FromDate.ToZeroString(), ToDate.ToZeroString())); return(ret); }
/// <summary> /// Valids the data. /// </summary> /// <returns></returns> protected override bool ValidData() { //if (cboActivityID.SelectedIndex == 1) //{ // // grdLookUpBudgetItemID.Enabled = false; // if ( grdLookUpWaitBudgetSourceID.EditValue == null) // { // XtraMessageBox.Show("Ban chua chon khoan thu", // ResourceHelper.GetResourceValueByName("ResDetailContent"), MessageBoxButtons.OK, MessageBoxIcon.Error); // grdLookUpWaitBudgetSourceID.Focus(); // return false; // } //} //if (cboActivityID.SelectedIndex == 2) //{ // if (grdLookUpWaitBudgetSourceID.EditValue == null) // { // XtraMessageBox.Show("Ban chua chon quy ", // ResourceHelper.GetResourceValueByName("ResDetailContent"), MessageBoxButtons.OK, MessageBoxIcon.Error); // grdLookUpWaitBudgetSourceID.Focus(); // return false; // } //} if (string.IsNullOrEmpty(CapitalAllocateCode)) { XtraMessageBox.Show(ResourceHelper.GetResourceValueByName("ResEmptyCapitalAllocateCode"), ResourceHelper.GetResourceValueByName("ResDetailContent"), MessageBoxButtons.OK, MessageBoxIcon.Error); txtCapitalAllocateCode.Focus(); return(false); } if (string.IsNullOrEmpty(BudgetSourceCode)) { XtraMessageBox.Show(ResourceHelper.GetResourceValueByName("ResEmptyCapitalAllocateByBudgetSourceCode"), ResourceHelper.GetResourceValueByName("ResDetailContent"), MessageBoxButtons.OK, MessageBoxIcon.Error); grdLookUpBudgetSourceID.Focus(); return(false); } if (string.IsNullOrEmpty(FromDate.ToString())) { XtraMessageBox.Show("Bạn chưa nhập ngày bắt đầu áp dụng chỉ tiêu", ResourceHelper.GetResourceValueByName("ResDetailContent"), MessageBoxButtons.OK, MessageBoxIcon.Error); dtFromDate.Focus(); return(false); } if (string.IsNullOrEmpty(ToDate.ToString())) { XtraMessageBox.Show("Bạn chưa nhập ngày kết thúc áp dụng chỉ tiêu", ResourceHelper.GetResourceValueByName("ResDetailContent"), MessageBoxButtons.OK, MessageBoxIcon.Error); dtToDate.Focus(); return(false); } return(true); }
public List <string> GetHeader() { List <string> list = new List <string>(); list.Add(string.Format("за : {0}", Currentfilter)); list.Add(string.Format("за период : {0} до {1}", FromDate.ToShortDateString(), ToDate.ToShortDateString())); list.Add(string.Format("Дата на извлечението : {0}", DateTime.Now.ToShortDateString())); list.Add(string.Format("за фирма : {0}", ConfigTempoSinglenton.GetInstance().CurrentFirma.Name)); list.Add(string.Format("Счетоводител : {0}", Config.CurrentUser.Name)); return(list); }