public static int GetBBQH(string sBBLX, DateTime dRQ) { int iBBQH = 0; bool flag = sBBLX.Equals("D"); if (flag) { iBBQH = dRQ.DayOfYear; } bool flag2 = sBBLX.Equals("W"); if (flag2) { iBBQH = DelphiTempletDesUtils.GetBBWeeks(dRQ); } bool flag3 = sBBLX.Equals("M"); if (flag3) { iBBQH = dRQ.Month; } bool flag4 = sBBLX.Equals("Y"); if (flag4) { iBBQH = 1; } return(iBBQH); }
public static bool RefBBStaEndDatetime(string sBBLX, DateTime dRQ, ref DateTime dBBStaDate, ref DateTime dBBEndDate) { bool flag = sBBLX.Equals("D"); if (flag) { dBBStaDate = dRQ; dBBEndDate = dRQ; } bool flag2 = sBBLX.Equals("W"); if (flag2) { dBBStaDate = DelphiTempletDesUtils.FirstDayOfWeek(dRQ); dBBEndDate = dBBStaDate.AddDays(6.0); } bool flag3 = sBBLX.Equals("M"); if (flag3) { dBBStaDate = dRQ.AddDays((double)(1 - dRQ.Day)); dBBEndDate = dRQ.AddMonths(1).AddDays((double)(-(double)dRQ.Day)); } bool flag4 = sBBLX.Equals("Y"); if (flag4) { dBBStaDate = new DateTime(dRQ.Year, 1, 1); dBBEndDate = new DateTime(dRQ.Year, 12, 31); } return(true); }
public static void DecodeRC(string sRC, ref int iRow, ref int iCol) { int c = 1; while (c <= sRC.Length && !Regex.IsMatch(sRC[c - 1].ToString(), "^\\d{1}$")) { c++; } bool flag = c > 1 && c <= sRC.Length; if (flag) { iRow = Convert.ToInt32(sRC.Substring(c - 1, sRC.Length - c + 1)); iCol = DelphiTempletDesUtils.GetCol(sRC.Substring(0, c - 1)); } }
public static DateTime FirstDayOfWeek(DateTime dRQ) { int year = dRQ.Year; int iFirstWeekDay = DelphiTempletDesUtils.GetFirstDayIntWeek(year); int iWeekDay = DelphiTempletDesUtils.DayOfWeekInt(dRQ); bool flag = iWeekDay >= iFirstWeekDay; int iAddDay; if (flag) { iAddDay = iFirstWeekDay - iWeekDay; } else { iAddDay = iFirstWeekDay - iWeekDay - 7; } return(dRQ.AddDays((double)iAddDay)); }
protected void Page_Load(object sender, EventArgs e) { bool flag = base.Request.Form["SAVEREPORT"] != null; if (flag) { string styleId = base.Request.Form["STYLEID"]; string styleOrder = base.Request.Form["STYLEORDER"]; string style = base.Request.Form["REPORTFORM"]; this.SaveReportStyle(styleId, styleOrder, style); } bool flag2 = !base.IsPostBack; if (flag2) { bool flag3 = string.IsNullOrEmpty(base.Request.Form["SAVEREPORT"]); if (flag3) { this.hidStyleId.Value = base.PageParam.GetString("STYLEID"); this.hidStyleOrder.Value = base.PageParam.GetString("STYLEORDER"); string designType = string.Format(";document.all.UtoYSDY.UtoType = '{0}'", "DesignBill"); string defineDataset = string.Format(";document.all.UtoYSDY.EnableEditUtoDataSet = '{0}'", "true"); string datasetXml = string.Format(";document.all.UtoYSDY.CompressUtoDataSet = '{0}'", DelphiTempletDesUtils.GetEncryZipBase64(base.PageParam.GetExtRawString("REPORTSTYLE"))); string reportStyle = this.GetReportStyle(this.hidStyleId.Value, this.hidStyleOrder.Value); bool flag4 = string.IsNullOrWhiteSpace(reportStyle); string LinkString; if (flag4) { LinkString = string.Format(";document.all.UtoYSDY.CompressUtoXml = '{0}';", DelphiTempletDesUtils.GetEncryZipBase64(base.PageParam.GetExtRawString("REPORTSTYLE"))); } else { LinkString = string.Format(";document.all.UtoYSDY.CompressUtoReport = '{0}';", reportStyle); } string regScript = designType + defineDataset + datasetXml + LinkString; base.RegisterScript("DesignReportStyle", regScript); } } }