public InventoryInquirySearch() { //string errText; //int errNo; InitializeComponent(); NavControlBox = new NavBox(); NavControlBox.Owner = this; dateCalendarStart.PositionPopupCalendarOverTextbox = true; dateCalendarStart.BringToFront(); dateCalendarEnd.PositionPopupCalendarOverTextbox = true; dateCalendarEnd.BringToFront(); //dateCalendarStart.SelectedDate = ""; //dateCalendarEnd.SelectedDate = ""; dateCalendarStart.SelectedDate = "mm/dd/yyyy"; dateCalendarEnd.SelectedDate = "mm/dd/yyyy"; //dateCalendarStart.SelectedDate = DateTime.Now.ToString("MM/dd/yyyy"); //dateCalendarEnd.SelectedDate = DateTime.Now.ToString("MM/dd/yyyy"); sortBy_cb.DataSource = StringDBMap_Enum <sortField_enum> .displayValues(); status_cb.DataSource = StringDBMap_Enum <statusField_enum> .displayValues(); //sortDir_cb.DataSource = StringDBMap_Enum<Inquiry.sortDir_enum>.displayValues(); sortBy_cb.SelectedIndex = 0; sortDir_cb.SelectedIndex = 0; DataSet data = InventoryInquiries.getCategories(); categoryForm = new CategorySelect(data); }
public DataSet getData() { return(getDataSet("PAWN_INQUIRIES", "get_retail_data", new List <OracleProcParam> { new OracleProcParam("p_storenumber", GlobalDataAccessor.Instance.CurrentSiteId.StoreNumber), new OracleProcParam("p_startDate", startDate), new OracleProcParam("p_endDate", endDate), new OracleProcParam("p_low_msr", (lowMSR >= 0) ? lowMSR.ToString() : ""), new OracleProcParam("p_high_msr", (highMSR >= 0) ? highMSR.ToString() : ""), new OracleProcParam("p_low_amount", (lowSaleAmount >= 0) ? String.Format("{0:f}", lowSaleAmount) : ""), new OracleProcParam("p_high_amount", (highSaleAmount >= 0) ? String.Format("{0:f}", highSaleAmount) : ""), new OracleProcParam("p_low_cost", (lowCostAmount >= 0) ? String.Format("{0:f}", lowCostAmount) : ""), new OracleProcParam("p_high_cost", (highCostAmount >= 0) ? String.Format("{0:f}", highCostAmount) : ""), new OracleProcParam("p_org_from_layaway", layawayOriginated), new OracleProcParam("p_byDate", (byDate) ? "Y" : "N"), new OracleProcParam("p_Status", StringDBMap_Enum <searchStatus_enum> .toDBValue(status)), new OracleProcParam("p_userID", userID), new OracleProcParam("p_includeVoids", includeVoids), new OracleProcParam("p_sort", StringDBMap_Enum <sortField_enum> .toDBValue(sortBy)), new OracleProcParam("p_sortDir", StringDBMap_Enum <sortDir_enum> .toDBValue(sortDir)) }, new Dictionary <string, string> { { "o_sale_info", "RETAIL_INFO" } })); }
public DataSet getData() { DataSet outputDataSet = getDataSet("PAWN_Inquiries", "get_partial_payment_data", new List <OracleProcParam> { new OracleProcParam("p_storenumber", GlobalDataAccessor.Instance.CurrentSiteId.StoreNumber), new OracleProcParam("p_startDate", startDate), new OracleProcParam("p_endDate", endDate), new OracleProcParam("p_lowTransfer", (lowAmount >= 0) ? String.Format("{0:f}", lowAmount) : ""), new OracleProcParam("p_highTransfer", (highAmount >= 0) ? String.Format("{0:f}", highAmount) : ""), new OracleProcParam("p_lastName", lastName), new OracleProcParam("p_firstName", firstName), new OracleProcParam("p_dob", dob), new OracleProcParam("p_customerNumber", customerNumber), new OracleProcParam("p_loanTicketNumber", (loanTicketNumber >= 0) ? loanTicketNumber.ToString() : ""), new OracleProcParam("p_sortBy", StringDBMap_Enum <sortField_enum> .toDBValue(sortBy)), new OracleProcParam("p_sortDir", StringDBMap_Enum <sortDir_enum> .toDBValue(sortDir)) }, new Dictionary <string, string> { { "partial_pmt_info_list", "PARTIAL_PAYMENT_INQ" } }); if (outputDataSet.IsNullOrEmpty()) { return(null); } return(outputDataSet); }
public override string ToString() { var retval = string.Empty; //int len = 0; if (byDate) { retval = string.Format("Extension Date: {0} to {1}\n", startDate, endDate); } else { retval = string.Format("Ticket Number: {0} to {1}\n", lowTicketNumber, highTicketNumber); } if (lowAmount > 0 || highAmount > 0) { retval += string.Format("Extension Amount between {0:c} and {1:c}\n", lowAmount, highAmount); } if (userID.Length > 0) { retval += string.Format("User ID: {0}\n", userID); } retval += string.Format("Sorted By: {0}, {1}\n", StringDBMap_Enum <sortField_enum> .displayValue(sortBy), StringDBMap_Enum <sortDir_enum> .displayValue(sortDir)); return(retval); }
public LoanInquirySearch() { InitializeComponent(); NavControlBox = new NavBox(); NavControlBox.Owner = this; dateCalendarStart.PositionPopupCalendarOverTextbox = true; dateCalendarEnd.PositionPopupCalendarOverTextbox = true; dateCalendarStart.SelectedDate = DateTime.Now.ToString("MM/dd/yyyy"); dateCalendarEnd.SelectedDate = DateTime.Now.ToString("MM/dd/yyyy"); dateOptions_CB.DataSource = StringDBMap_Enum <PawnInquiry.searchDateType_enum> .displayValues(); TicketNumberType_CB.DataSource = StringDBMap_Enum <PawnInquiry.searchTicketType_enum> .displayValues(); status_cb.DataSource = StringDBMap_Enum <PawnInquiry.searchStatus_enum> .displayValues(); sortBy_cb.DataSource = StringDBMap_Enum <PawnInquiry.sortField_enum> .displayValues(); sortBy_cb.SelectedIndex = 0; sortDir_cb.SelectedIndex = 0; status_cb.SelectedIndex = 0; mailer_cb.SelectedIndex = -1; }
public DailySalesCriteria_panel() { InitializeComponent(); SortBy_cb.DataSource = StringDBMap_Enum <SortType_enum> .displayValues(); Option_cb.DataSource = StringDBMap_Enum <OptionType_enum> .displayValues(); clearPanelFields(); }
public DataSet getData() { DataSet outputDataSet = getDataSet("PAWN_Inquiries", "get_extension_data", new List <OracleProcParam> { new OracleProcParam("p_byDate", (byDate) ? "Y" : "N"), new OracleProcParam("p_startDate", startDate), new OracleProcParam("p_endDate", endDate), new OracleProcParam("p_lowTicket", (lowTicketNumber > 0) ? lowTicketNumber.ToString() : ""), new OracleProcParam("p_highTicket", (highTicketNumber > 0) ? highTicketNumber.ToString() : ""), new OracleProcParam("p_lowAmount", (lowAmount > 0) ? String.Format("{0:f}", lowAmount) : ""), new OracleProcParam("p_highAmount", (highAmount > 0) ? String.Format("{0:f}", highAmount) : ""), new OracleProcParam("p_userID", userID), new OracleProcParam("p_storenumber", CashlinxDesktopSession.Instance.CurrentSiteId.StoreNumber), new OracleProcParam("p_sort", StringDBMap_Enum <sortField_enum> .toDBValue(sortBy)), new OracleProcParam("p_sortDir", StringDBMap_Enum <sortDir_enum> .toDBValue(sortDir)), }, new Dictionary <string, string> { { "o_ext_data", "EXT_INFO" }, { "o_pawn_cust_list", "PAWN_CUST" } }); if (outputDataSet.IsNullOrEmpty()) { return(null); } try { outputDataSet.Tables["EXT_INFO"].Columns.Add("CUST_NAME", typeof(string)); outputDataSet.Relations.Add("customerRelation", outputDataSet.Tables["PAWN_CUST"].Columns["TICKET_NUMBER"], outputDataSet.Tables["EXT_INFO"].Columns["TICKET_NUMBER"]); } catch { throw new BusinessLogicException(string.Format("An error was detected in the {0} data retreived", "Customer")); } foreach (DataRow r in outputDataSet.Tables["EXT_INFO"].Rows) { DataRow customer = r.GetParentRow("customerRelation"); r.SetField <string>("CUST_NAME", customer.Field <string>("CUST_NAME")); } return(outputDataSet); }
public DataSet getData() { return(getDataSet("PAWN_Inquiries", "get_inventory_data", new List <OracleProcParam> { new OracleProcParam("p_storenumber", GlobalDataAccessor.Instance.DesktopSession.CurrentSiteId.StoreNumber), new OracleProcParam("p_icn_store", (Mdse.Icn.ShopNumber == -1)? "" : Mdse.Icn.ShopNumber.ToString()), new OracleProcParam("p_icn_year", icnYear_IsNull ? "" : Mdse.Icn.LastDigitOfYear.ToString()), new OracleProcParam("p_icn_doc", (Mdse.Icn.DocumentNumber == -1) ? "" : Mdse.Icn.DocumentNumber.ToString()), new OracleProcParam("p_icn_doc_type", (icnDocType_IsNull) ? "" : ((int)Mdse.Icn.DocumentType).ToString()), new OracleProcParam("p_icn_item", (Mdse.Icn.ItemNumber == -1) ? "" : Mdse.Icn.ItemNumber.ToString()), new OracleProcParam("p_icn_sub_item", (Mdse.Icn.SubItemNumber == -1) ? "" : Mdse.Icn.SubItemNumber.ToString()), new OracleProcParam("p_rfb_number", (RfbNr == -1) ? "" : RfbNr.ToString()), new OracleProcParam("p_gun_number", (GunNumber == -1) ? "" : GunNumber.ToString()), addPCatCodes(new OracleProcParam(ParameterDirection.Input, DataTypeConstants.PawnDataType.LISTINT, "p_categories", cat_code.Count)), new OracleProcParam("p_status_cd", StringDBMap_Enum <statusField_enum> .toDBValue(status)), new OracleProcParam("p_start_status_dt", (lowStatusDate == DateTime.MinValue) ? "" : lowStatusDate.ToShortDateString()), new OracleProcParam("p_end_status_dt", (highStatusDate == DateTime.MaxValue) ? "" : highStatusDate.ToShortDateString()), new OracleProcParam("p_age", (age == -1) ? "" : age.ToString()), new OracleProcParam("p_lowRtlPrc", (lowRetail == -1) ? "" : lowRetail.ToString()), new OracleProcParam("p_highRtlPrc", (highRetail == -1) ? "" : highRetail.ToString()), new OracleProcParam("p_lowItmAmt", (lowCost == -1) ? "" : lowCost.ToString()), new OracleProcParam("p_highItmAmt", (highCost == -1) ? "" : highCost.ToString()), new OracleProcParam("p_itemCost", (fieldCost == -1) ? "" : fieldCost.ToString()), new OracleProcParam("p_desc", descr), new OracleProcParam("p_manuf", manufacturer), new OracleProcParam("p_model", model), new OracleProcParam("p_sn", serialNr), new OracleProcParam("p_loc", location), new OracleProcParam("p_aisle", aisle), new OracleProcParam("p_shelf", shelf), new OracleProcParam("p_sort", StringDBMap_Enum <sortField_enum> .toDBValue(sortBy)), new OracleProcParam("p_sortDir", StringDBMap_Enum <sortDir_enum> .toDBValue(sortDir)), }, new Dictionary <string, string> { { "o_mdse", "MDSE" } })); }
private void CashTransferInquirySearch_Load(object sender, EventArgs e) { // Load Cash Drawer Data from database try { dsCashDrawersSource = global::Pawn.Forms.Inquiry.CashTransferInquiry.CashTransferInquiry.getCashDrawersForStore(GlobalDataAccessor.Instance.CurrentSiteId.StoreNumber); if (dsCashDrawersSource.IsNullOrEmpty()) { throw new BusinessLogicException(ReportConstants.NODATA); } dsCashDrawersDestination = dsCashDrawersSource.Copy(); } catch (BusinessLogicException blex) { MessageBox.Show(blex.Message); return; } // Load list of Banks from database try { dsBanksSource = global::Pawn.Forms.Inquiry.CashTransferInquiry.CashTransferInquiry.getAllBanksStore(CashlinxDesktopSession.Instance.CurrentSiteId.StoreNumber); if (dsBanksSource.IsNullOrEmpty()) { throw new BusinessLogicException(ReportConstants.NODATA); } dsBanksDestination = dsBanksSource.Copy(); } catch (BusinessLogicException blex) { MessageBox.Show(blex.Message); return; } // Load all Store Numbers from database PrepareShopTextForAutoComplete(); transfer_type_cb.DataSource = StringDBMap_Enum <global::Pawn.Forms.Inquiry.CashTransferInquiry.CashTransferInquiry.transferType_enum> .displayValues(); transfer_type_cb.SelectedIndex = 0; }
public ExtensionInquirySearch() { InitializeComponent(); NavControlBox = new NavBox(); NavControlBox.Owner = this; dateCalendarStart.PositionPopupCalendarOverTextbox = true; dateCalendarEnd.PositionPopupCalendarOverTextbox = true; dateCalendarStart.SelectedDate = DateTime.Now.ToString("MM/dd/yyyy"); dateCalendarEnd.SelectedDate = DateTime.Now.ToString("MM/dd/yyyy"); sortBy_cb.DataSource = StringDBMap_Enum <PawnExtInquiry.sortField_enum> .displayValues(); sortBy_cb.SelectedIndex = 0; sortDir_cb.SelectedIndex = 0; }
public PartialPaymentInquirySearch() { InitializeComponent(); NavControlBox = new NavBox(); NavControlBox.Owner = this; dateCalendarStart.PositionPopupCalendarOverTextbox = true; dateCalendarEnd.PositionPopupCalendarOverTextbox = true; dateCalendarStart.SelectedDate = "mm/dd/yyyy"; dateCalendarEnd.SelectedDate = "mm/dd/yyyy"; txtDOB.Required = false; sortBy_cb.DataSource = StringDBMap_Enum <PartialPaymentInquiry.sortField_enum> .displayValues(); sortBy_cb.SelectedIndex = 0; sortDir_cb.SelectedIndex = 0; }
public GunBookInquirySearch() { InitializeComponent(); NavControlBox = new NavBox(); NavControlBox.Owner = this; this.Controls.OfType <DateCalendar>().Select( c => { c.PositionPopupCalendarOverTextbox = true; c.SelectedDate = "mm/dd/yyyy"; return(c); }); sortBy_cb.DataSource = StringDBMap_Enum <GunBookInquiry.sortField_enum> .displayValues(); sortBy_cb.SelectedIndex = 0; sortDir_cb.SelectedIndex = 0; }
public override string sortByField() { string retval; switch (sortBy) { case sortField_enum.DATE: if (byDate) { retval = StringDBMap_Enum <searchDateType_enum> .toDBValue(dateType); } else { retval = "DATE_MADE"; } break; case sortField_enum.TICKET: if (byDate) { retval = "TICKET_NUMBER"; } else { retval = StringDBMap_Enum <searchTicketType_enum> .toDBValue(ticketType); } break; default: retval = StringDBMap_Enum <sortField_enum> .toDBValue(sortBy); break; } return(retval); }
public DataSet getData() { DataSet outputDataSet = getDataSet("PAWN_Inquiries", "get_cash_transfer_data", new List <OracleProcParam> { new OracleProcParam("p_byDate", (byDate) ? "Y" : "N"), new OracleProcParam("p_startDate", startDate), new OracleProcParam("p_endDate", endDate), new OracleProcParam("p_lowTransfer", (lowTransferNumber >= 0) ? lowTransferNumber.ToString() : ""), new OracleProcParam("p_highTransfer", (highTransferNumber >= 0) ? highTransferNumber.ToString() : ""), new OracleProcParam("p_transferType", StringDBMap_Enum <transferType_enum> .toDBValue(transferType)), new OracleProcParam("p_lowLoanAmount", (lowAmount >= 0) ? String.Format("{0:f}", lowAmount) : ""), new OracleProcParam("p_highLoanAmount", (highAmount >= 0) ? String.Format("{0:f}", highAmount) : ""), new OracleProcParam("p_sourcePrimary", sourcePrimary), new OracleProcParam("p_sourceSecondary", sourceSecondary), new OracleProcParam("p_destinationPrimary", destinationPrimary), new OracleProcParam("p_destinationSecondary", destinationSecondary), new OracleProcParam("p_Status", status), new OracleProcParam("p_userID", userID), new OracleProcParam("p_storenumber", GlobalDataAccessor.Instance.CurrentSiteId.StoreNumber), new OracleProcParam("p_sortBy", sortBy.ToString()), new OracleProcParam("p_sortDir", StringDBMap_Enum <sortDir_enum> .toDBValue(sortDir)) }, new Dictionary <string, string> { { "o_bank_transfer_list", "BANK_TRANSFERS" }, { "o_store_transfer_list", "STORE_TRANSFERS" }, { "o_store_to_store_transferlist", "SHOP_TO_SHOP_TRANSFERS" } }); if (outputDataSet.IsNullOrEmpty()) { return(null); } return(outputDataSet); }
public CashTransferInquirySearch() { InitializeComponent(); NavControlBox = new NavBox(); NavControlBox.Owner = this; dateCalendarStart.PositionPopupCalendarOverTextbox = true; dateCalendarEnd.PositionPopupCalendarOverTextbox = true; dateCalendarStart.SelectedDate = DateTime.Now.ToString("MM/dd/yyyy"); dateCalendarEnd.SelectedDate = DateTime.Now.ToString("MM/dd/yyyy"); sortBy_cb.DataSource = StringDBMap_Enum <global::Pawn.Forms.Inquiry.CashTransferInquiry.CashTransferInquiry.sortField_enum> .displayValues(); sortBy_cb.SelectedIndex = 0; sortDir_cb.SelectedIndex = 0; label_source_secondary.Visible = false; label_dest_secondary.Visible = false; label_source_primary.Visible = true; label_dest_primary.Visible = true; }
public static DataSet getData( int gunnumber_begin, int gunnumber_end, int orggunnumber_begin, int orggunnumber_end, int ticketnumber, int icn_store, int icn_year, int icn_doc, string icn_doc_type, int icn_item, int icn_sub_item, string bound, string model, string serialnumber, string type, string status, int gunbook_begin, int gunbook_end, string acq_startDate, // MM/DD/YYYY string acq_endDate, string acq_lastname, string acq_firstname, string acq_customernumber, string disp_startDate, // MM/DD/YYYY string disp_endDate, string disp_lastname, string disp_firstname, string disp_customernumber, sortField_enum _sortBy, sortDir_enum _sortDir ) { DataSet outputDataSet = getDataSet("ED_PAWN_INQUIRIES_13X", "get_gunbook_data", new List <OracleProcParam> { new OracleProcParam("p_storenumber", GlobalDataAccessor.Instance.CurrentSiteId.StoreNumber), new OracleProcParam("p_gunnumber_begin", (gunnumber_begin > 0) ? (gunnumber_begin.ToString()) : ""), new OracleProcParam("p_gunnumber_end", (gunnumber_end > 0) ? (gunnumber_end.ToString()) : ""), new OracleProcParam("p_orggunnumber_begin", (orggunnumber_begin > 0) ? (orggunnumber_begin.ToString()) : ""), new OracleProcParam("p_orggunnumber_end", (orggunnumber_end > 0) ? (orggunnumber_end.ToString()) : ""), new OracleProcParam("p_ticketnumber", (ticketnumber > 0) ? (ticketnumber.ToString()) : ""), new OracleProcParam("p_icn_store", (icn_store > 0) ? (icn_store.ToString()) : ""), new OracleProcParam("p_icn_year", (icn_year > 0) ? (icn_year.ToString()) : ""), new OracleProcParam("p_icn_doc", (icn_doc > 0) ? (icn_doc.ToString()) : ""), new OracleProcParam("p_icn_doc_type", icn_doc_type), new OracleProcParam("p_icn_item", (icn_item > 0) ? (icn_item.ToString()) : ""), new OracleProcParam("p_icn_subitem", (icn_sub_item >= 0) ? (icn_sub_item.ToString()) : ""), new OracleProcParam("p_bound", bound), new OracleProcParam("p_model", model), new OracleProcParam("p_serialnumber", serialnumber), new OracleProcParam("p_type", type), new OracleProcParam("p_status", status), new OracleProcParam("p_gunbook_begin", (gunbook_begin > 0) ? (gunbook_begin.ToString()) : ""), new OracleProcParam("p_gunbook_end", (gunbook_end > 0) ? (gunbook_end.ToString()) : ""), new OracleProcParam("p_acq_startDate", acq_startDate), new OracleProcParam("p_acq_endDate", acq_endDate), new OracleProcParam("p_acq_lastname", acq_lastname), new OracleProcParam("p_acq_firstname", acq_firstname), new OracleProcParam("p_acq_customernumber", acq_customernumber), new OracleProcParam("p_disp_startDate", disp_startDate), new OracleProcParam("p_disp_endDate", disp_endDate), new OracleProcParam("p_disp_lastname", disp_lastname), new OracleProcParam("p_disp_firstname", disp_firstname), new OracleProcParam("p_disp_customernumber", disp_customernumber), new OracleProcParam("p_sortBy", StringDBMap_Enum <sortField_enum> .toDBValue(_sortBy)), new OracleProcParam("p_sortDir", StringDBMap_Enum <sortDir_enum> .toDBValue(_sortDir)) }, new Dictionary <string, string> { { "o_gun_book_info_info", "GUN_BOOK_DATA" } }); if (outputDataSet.IsNullOrEmpty()) { return(null); } return(outputDataSet); }
public override string ToString() { string retval = string.Empty; if (Mdse.Icn.ShopNumber != -1 || !icnYear_IsNull || Mdse.Icn.DocumentNumber != -1 || !icnDocType_IsNull || Mdse.Icn.ItemNumber != -1 || Mdse.Icn.SubItemNumber != -1) { retval += string.Format("ICN: {0} {1} {2} {3} {4} {5}\n", (Mdse.Icn.ShopNumber == -1) ? "*" : Mdse.Icn.ShopNumber.ToString(), (icnYear_IsNull) ? "*" : Mdse.Icn.LastDigitOfYear.ToString(), (Mdse.Icn.DocumentNumber == -1) ? "*" : Mdse.Icn.DocumentNumber.ToString(), (icnDocType_IsNull) ? "*" : ((int)Mdse.Icn.DocumentType).ToString(), (Mdse.Icn.ItemNumber == -1) ? "*" : Mdse.Icn.ItemNumber.ToString(), (Mdse.Icn.SubItemNumber == -1) ? "*" : Mdse.Icn.SubItemNumber.ToString()); } if (RfbNr > 0) { retval += string.Format("RFB: {0}\n", RfbNr); } if (GunNumber > 0) { retval += string.Format("Gun Number: {0}\n", GunNumber); } if (cat_code.Count > 0) { if (!(cat_code.Count == 1 && cat_code[0] == "-1")) { retval += "Categories: "; bool first = true; int catLength = 14; foreach (string s in cat_names) { if (!first) { retval += ", "; } else { first = false; } if (catLength > _wrapWidth) { retval += "\n "; catLength = 14; } retval += s; catLength += s.Length + 2; } retval += "\n"; } } if (status != statusField_enum.ALL) { retval += string.Format("Status: {0}\n", StringDBMap_Enum <statusField_enum> .displayValue(status)); } if (highStatusDate != DateTime.MaxValue && lowStatusDate != DateTime.MinValue) { retval += string.Format("Status updated between {0:d} and {1:d}\n", lowStatusDate, highStatusDate); } if (age >= 0) { retval += string.Format("Inventory Age: {0}\n", age); } if (lowRetail > 0 || highRetail > 0) { if (highRetail > 0) { retval += string.Format("Retail Price between {0:c} and {1:c}\n", (lowRetail > 0) ? lowRetail : 0, highRetail); } else if (lowRetail > 0) { retval += string.Format("Retail Price >= {0:c}\n", lowRetail); } } if (lowCost > 0 || highCost > 0) { if (highCost > 0) { retval += string.Format("Item Price between {0:c} and {1:c}\n", (lowCost > 0) ? lowCost : 0, highCost); } else if (lowCost > 0) { retval += string.Format("Item Price >= {0:c}\n", lowCost); } } if (descr.Length > 0) { retval += string.Format("Description is like *{0}*\n", descr); } if (manufacturer.Length > 0) { retval += string.Format("Manufacturer: {0}\n", manufacturer); } if (model.Length > 0) { retval += string.Format("Model: {0}\n", model); } if (serialNr.Length > 0) { retval += string.Format("Serial Nr: {0}\n", serialNr); } if (aisle.Length > 0 || shelf.Length > 0 || location.Length > 0) { retval += string.Format("Location (aisle / shelf / other): {0} / {1} / {2}\n", aisle, shelf, location); } retval += string.Format("\nSorted By: {0} {1}", StringDBMap_Enum <sortField_enum> .displayValue(sortBy), StringDBMap_Enum <sortDir_enum> .displayValue(sortDir)); return(retval); }
public override string ToString() { string retval = string.Empty; // startDate, endDate if (this.startDate.Length != 0 || this.endDate.Length != 0) { if (this.startDate.Length != 0 && this.endDate.Length != 0) { retval += string.Format("Partial Payments Made: {0:C} to {1:C} \n", this.startDate, this.endDate); } else if (this.startDate.Length != 0) { retval += string.Format("Partial Payments on: {0:C}\n", this.startDate); } else { retval += string.Format("Partial Payments on or before: {0:C}\n", this.endDate); } } // lowAmount, highAmount if (this.lowAmount >= 0 || this.highAmount >= 0) { if (this.lowAmount >= 0 || this.highAmount >= 0) { retval += string.Format("Partial Payments Amount: {0:C} to {1:C} \n", this.lowAmount, this.highAmount); } else if (this.lowAmount >= 0) { retval += string.Format("Partial Payments Exactly: {0:C}\n", this.lowAmount); } else { retval += string.Format("Partial Payments less than or equal to: {0:C}\n", this.highAmount); } } // lastName, firstName if (this.lastName.Length != 0 && this.firstName.Length != 0) { retval += string.Format("Name: {0}, {1}\n", lastName, firstName); } else if (this.lastName.Length != 0) { retval += string.Format("Name: {0}\n", lastName); } else if (this.firstName.Length != 0) { retval += string.Format("Name: {0}\n", firstName); } // DOB if (this.dob.Length != 0) { retval += string.Format("Date of Birth: {0}\n", this.dob); } // customerNumber if (this.customerNumber.Length != 0) { retval += string.Format("Customer Number: {0}\n", this.customerNumber); } // loanTicketNumber if (this.loanTicketNumber > 0) { retval += string.Format("Loan Ticket Number: {0}\n", this.loanTicketNumber); } // Sort By, Asc, Dsc retval += string.Format("\nSorted By: {0}, {1}\n", StringDBMap_Enum <sortField_enum> .displayValue(sortBy), StringDBMap_Enum <sortDir_enum> .displayValue(sortDir)); return(retval); }
public override string sortByName() { return(StringDBMap_Enum <sortField_enum> .displayValue(sortBy)); }
public override string sortByField() { return(StringDBMap_Enum <sortField_enum> .toDBValue(sortBy)); }
private void PopulateSourceAndDestinationPrimaryComboBoxes() { switch (StringDBMap_Enum <global::Pawn.Forms.Inquiry.CashTransferInquiry.CashTransferInquiry.transferType_enum> .fromString(this.transfer_type_cb.SelectedItem.ToString())) { case (global::Pawn.Forms.Inquiry.CashTransferInquiry.CashTransferInquiry.transferType_enum.BANK): // Transfer Source/Destination transfer_source_primary_cb.Visible = true; transfer_source_secondary_cb.Visible = true; transfer_destination_primary_cb.Visible = true; transfer_destination_secondary_cb.Visible = true; label_source_primary.Visible = true; label_dest_primary.Visible = true; transfer_source_primary_cb.Items.Clear(); transfer_source_primary_cb.Items.Add(" "); transfer_source_primary_cb.Items.Add("Safe"); transfer_source_primary_cb.Items.Add("Bank"); transfer_destination_primary_cb.Items.Clear(); transfer_destination_primary_cb.Items.Add(" "); transfer_destination_primary_cb.Items.Add("Safe"); transfer_destination_primary_cb.Items.Add("Bank"); transfer_source_primary_cb.SelectedIndex = 0; transfer_destination_primary_cb.SelectedIndex = 0; // Status status_cb.Visible = true; status_cb.Items.Clear(); status_cb.Items.Add(new KeyValuePair <String, String>(" ", "")); status_cb.Items.Add(new KeyValuePair <String, String>("Accepted", "ACCEPTED")); status_cb.Items.Add(new KeyValuePair <String, String>("Void", "VOID")); status_cb.ValueMember = "Value"; status_cb.DisplayMember = "Key"; status_cb.SelectedIndex = 0; break; case (global::Pawn.Forms.Inquiry.CashTransferInquiry.CashTransferInquiry.transferType_enum.INTERNAL): // Transfer Source/Destination transfer_source_primary_cb.Visible = true; transfer_source_secondary_cb.Visible = true; transfer_destination_primary_cb.Visible = true; transfer_destination_secondary_cb.Visible = true; label_source_primary.Visible = true; label_dest_primary.Visible = true; transfer_source_primary_cb.Items.Clear(); transfer_source_primary_cb.Items.Add(" "); transfer_source_primary_cb.Items.Add("Drawer"); transfer_source_primary_cb.Items.Add("Safe"); transfer_destination_primary_cb.Items.Clear(); transfer_destination_primary_cb.Items.Add(" "); transfer_destination_primary_cb.Items.Add("Drawer"); transfer_destination_primary_cb.Items.Add("Safe"); transfer_source_primary_cb.SelectedIndex = 0; transfer_destination_primary_cb.SelectedIndex = 0; // Status status_cb.Visible = true; status_cb.Items.Clear(); status_cb.Items.Add(new KeyValuePair <String, String>(" ", "")); status_cb.Items.Add(new KeyValuePair <String, String>("Accepted", "ACCEPTED")); status_cb.Items.Add(new KeyValuePair <String, String>("Void", "VOID")); status_cb.ValueMember = "Value"; status_cb.DisplayMember = "Key"; status_cb.SelectedIndex = 0; break; case (global::Pawn.Forms.Inquiry.CashTransferInquiry.CashTransferInquiry.transferType_enum.SAFE): // Transfer Source/Destination transfer_source_primary_cb.Visible = false; transfer_source_secondary_cb.Visible = false; transfer_destination_primary_cb.Visible = false; transfer_destination_secondary_cb.Visible = false; label_source_primary.Visible = false; label_dest_primary.Visible = false; label_source_secondary.Visible = false; label_dest_secondary.Visible = false; transfer_source_secondary_txtBox.Visible = false; transfer_destination_secondary_txtBox.Visible = false; transfer_source_primary_cb.Items.Clear(); transfer_source_secondary_cb.DataSource = null; transfer_source_secondary_cb.Items.Clear(); transfer_destination_primary_cb.Items.Clear(); transfer_destination_secondary_cb.DataSource = null; transfer_destination_secondary_cb.Items.Clear(); // Status status_cb.Visible = true; status_cb.Items.Clear(); status_cb.Items.Add(new KeyValuePair <String, String>(" ", "")); status_cb.Items.Add(new KeyValuePair <String, String>("Accepted", "ACCEPTED")); status_cb.ValueMember = "Value"; status_cb.DisplayMember = "Key"; status_cb.SelectedIndex = 0; break; case (global::Pawn.Forms.Inquiry.CashTransferInquiry.CashTransferInquiry.transferType_enum.SHOP_TO_SHOP): // Transfer Source/Destination transfer_source_primary_cb.Visible = true; transfer_source_secondary_cb.Visible = true; transfer_destination_primary_cb.Visible = true; transfer_destination_secondary_cb.Visible = true; label_source_primary.Visible = true; label_dest_primary.Visible = true; transfer_source_primary_cb.Items.Clear(); transfer_source_primary_cb.Items.Add(" "); transfer_source_primary_cb.Items.Add("Safe"); transfer_source_primary_cb.Items.Add("Shop"); transfer_destination_primary_cb.Items.Clear(); transfer_destination_primary_cb.Items.Add(" "); transfer_destination_primary_cb.Items.Add("Safe"); transfer_destination_primary_cb.Items.Add("Shop"); transfer_source_primary_cb.SelectedIndex = 0; transfer_destination_primary_cb.SelectedIndex = 0; // Status status_cb.Visible = true; status_cb.Items.Clear(); status_cb.Items.Add(new KeyValuePair <String, String>(" ", "")); status_cb.Items.Add(new KeyValuePair <String, String>("Pending", "PENDING")); status_cb.Items.Add(new KeyValuePair <String, String>("Accepted", "ACCEPTED")); status_cb.Items.Add(new KeyValuePair <String, String>("Void", "VOID")); status_cb.ValueMember = "Value"; status_cb.DisplayMember = "Key"; status_cb.SelectedIndex = 0; break; default: System.Diagnostics.Debug.Assert(false, "Unhandled condition. Forget to add handler?"); break; } }
public override string ToString() { string retval = ""; if (byDate) { retval += string.Format("Date: {0} to {1} \n", startDate, endDate); } else if (lowMSR >= 0 || highMSR >= 0) { retval += "Ticket:"; if (lowMSR >= 0 && highMSR >= 0) { retval += string.Format("{0} to {1} \n", lowMSR, highMSR); } else if (lowMSR >= 0) { retval += string.Format("{0}\n", lowMSR); } else { retval += string.Format("{0}\n", highMSR); } } if (lowSaleAmount >= 0 || highSaleAmount >= 0) { retval += "Sale Amount:"; if (lowSaleAmount >= 0 && highSaleAmount >= 0) { retval += string.Format("{0} to {1} \n", lowSaleAmount, highSaleAmount); } else if (lowSaleAmount >= 0) { retval += string.Format("{0}\n", lowSaleAmount); } else { retval += string.Format("{0}\n", highSaleAmount); } } if (lowCostAmount >= 0 || highCostAmount >= 0) { retval += "Cost Amount:"; if (lowCostAmount >= 0 && highCostAmount >= 0) { retval += string.Format("{0} to {1} \n", lowCostAmount, highCostAmount); } else if (lowCostAmount >= 0) { retval += string.Format("{0}\n", lowCostAmount); } else { retval += string.Format("{0}\n", highCostAmount); } } if (!string.IsNullOrEmpty(layawayOriginated)) { retval += string.Format("Originated from Layaway: {0}\n", layawayOriginated); } if (status != searchStatus_enum.ALL) { retval += string.Format("Status: {0}\n", StringDBMap_Enum <searchStatus_enum> .displayValue(status)); } if (!string.IsNullOrEmpty(userID)) { retval += string.Format("User ID: {0}\n", userID); } if (!string.IsNullOrEmpty(includeVoids)) { retval += string.Format("Include Voids: {0}\n", includeVoids); } //------- retval += string.Format("Sorted By: {0}, {1}\n", StringDBMap_Enum <sortField_enum> .displayValue(sortBy), StringDBMap_Enum <sortDir_enum> .displayValue(sortDir)); return(retval); }
private void Find_btn_Click(object sender, EventArgs e) { Cursor.Current = Cursors.WaitCursor; var criteria = new InventoryInquiries(); criteria.Mdse = new MDSE(); criteria.Mdse.Icn.ShopNumber = getIntVal(ICN_shop_tb, -1); if (ICN_year_tb.Text.Length > 0) { criteria.Mdse.Icn.LastDigitOfYear = getIntVal(ICN_year_tb, -1); criteria.icnYear_IsNull = false; } criteria.Mdse.Icn.DocumentNumber = getIntVal(ICN_doc_tb, -1); int doc_type = getIntVal(ICN_doc_type_tb, -1); if (doc_type >= 0 && doc_type < 10) { criteria.Mdse.Icn.DocumentType = (DocumentType)doc_type; criteria.icnDocType_IsNull = false; } // need to add exception management -- parse is not fail safe criteria.Mdse.Icn.ItemNumber = getIntVal(ICN_item_tb, -1); criteria.Mdse.Icn.SubItemNumber = getIntVal(ICN_sub_item_tb, -1); criteria.RfbNr = getIntVal(rfb_tb, -1); criteria.GunNumber = getIntVal(gunNbr_tb, -1); if (status_cb.SelectedItem != null) { criteria.status = StringDBMap_Enum <statusField_enum> .fromString(status_cb.SelectedItem.ToString()); } if (dateCalendarStart.SelectedDate != "mm/dd/yyyy" && dateCalendarStart.SelectedDate.Length > 0) { criteria.lowStatusDate = DateTime.Parse(dateCalendarStart.SelectedDate); } else { criteria.lowStatusDate = DateTime.MinValue; } if (dateCalendarEnd.SelectedDate != "mm/dd/yyyy" && dateCalendarStart.SelectedDate.Length > 0) { criteria.highStatusDate = DateTime.Parse(dateCalendarEnd.SelectedDate); } else { criteria.highStatusDate = DateTime.MaxValue; } criteria.age = getIntVal(invAge_tb, -1); bool converted = decimal.TryParse(lowRetailAmt_tb.Text, out criteria.lowRetail); if (!converted) { criteria.lowRetail = -1; } converted = decimal.TryParse(highRetailAmt_tb.Text, out criteria.highRetail); if (!converted) { criteria.highRetail = -1; } converted = decimal.TryParse(lowCost_tb.Text, out criteria.lowCost); if (!converted) { criteria.lowCost = -1; } converted = decimal.TryParse(highCost_tb.Text, out criteria.highCost); if (!converted) { criteria.highCost = -1; } converted = decimal.TryParse(fieldCost_tb.Text, out criteria.fieldCost); if (!converted) { criteria.fieldCost = -1; } criteria.descr = descr_tb.Text; criteria.manufacturer = manuf_tb.Text; criteria.model = model_tb.Text; criteria.serialNr = serialNr_tb.Text; criteria.aisle = aisle_tb.Text; criteria.shelf = shelf_tb.Text; criteria.location = loctn_tb.Text; criteria.sortBy = StringDBMap_Enum <sortField_enum> .fromString(sortBy_cb.SelectedItem.ToString()); criteria.sortDir = StringDBMap_Enum <Inquiry.sortDir_enum> .fromString(sortDir_cb.SelectedItem.ToString()); if (this.catCodes != null && this.catCodes.GetLength(0) > 0) { criteria.cat_code = new List <string>(this.catCodes); criteria.cat_names = new List <string>(this.catNames); } else { criteria.cat_code = new List <string>(); criteria.cat_code.Add("-1"); //empty array } DataSet s = null; try { s = criteria.getData(); if (s.IsNullOrEmpty()) { throw new BusinessLogicException(ReportConstants.NODATA); } } catch (BusinessLogicException blex) { MessageBox.Show(blex.Message); return; } //this.NavControlBox.Action = NavBox.NavAction.HIDEANDSHOW; Cursor.Current = Cursors.Default; this.Visible = false; var resultsDisplay = new InventorySearchResults(s, criteria, "MDSE"); resultsDisplay.ShowDialog(); if (resultsDisplay.DialogResult == DialogResult.Cancel) { this.Close(); } else { this.Visible = true; } }
public LoanSearchResults(DataSet s, PawnInquiry criteria, string dataTableName) : base(s, criteria, dataTableName) { #region Data Grid Initialization System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); //Display grid with current principal if partial payments are allowed. if (new BusinessRulesProcedures(GlobalDataAccessor.Instance.DesktopSession).IsPartialPaymentAllowed(GlobalDataAccessor.Instance.CurrentSiteId)) { this.Shop = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.ticket = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.cust_name = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.DateTime = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.LnAmount = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.PrinicipalAmount = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Status = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.UserID = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.resultsGrid_dg.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.Shop, this.ticket, this.cust_name, this.DateTime, this.LnAmount, this.PrinicipalAmount, this.Status, this.UserID }); } else { this.Shop = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.ticket = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.cust_name = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.DateTime = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.LnAmount = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Status = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.UserID = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.resultsGrid_dg.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.Shop, this.ticket, this.cust_name, this.DateTime, this.LnAmount, this.Status, this.UserID }); } // // Shop // this.Shop.DataPropertyName = "STORENUMBER"; this.Shop.HeaderText = "Shop"; this.Shop.Name = "Shop"; this.Shop.ReadOnly = true; this.Shop.Width = 50; // // ticket // this.ticket.DataPropertyName = "TICKET_NUMBER"; this.ticket.HeaderText = "Current Tkt #"; this.ticket.Name = "ticket"; this.ticket.ReadOnly = true; this.ticket.Width = 83; // // cust_name // this.cust_name.DataPropertyName = "CUST_NAME"; this.cust_name.HeaderText = "Name"; this.cust_name.Name = "cust_name"; this.cust_name.ReadOnly = true; this.cust_name.Width = 170; // // DateTime // this.DateTime.DataPropertyName = "DATE_MADE"; dataGridViewCellStyle3.Format = "g"; dataGridViewCellStyle3.NullValue = null; this.DateTime.DefaultCellStyle = dataGridViewCellStyle3; this.DateTime.HeaderText = "Made Date/Time"; this.DateTime.Name = "DateTime"; this.DateTime.ReadOnly = true; this.DateTime.Width = 115; // // LnAmount // this.LnAmount.DataPropertyName = "PRIN_AMOUNT"; dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight; dataGridViewCellStyle4.Format = "C2"; dataGridViewCellStyle4.NullValue = null; this.LnAmount.DefaultCellStyle = dataGridViewCellStyle4; this.LnAmount.HeaderText = "Loan Amount"; this.LnAmount.Name = "LnAmount"; this.LnAmount.ReadOnly = true; this.LnAmount.Width = 90; // // Current Prin. Amount // //Only show current principal column if partial payments are allowed. if (new BusinessRulesProcedures(GlobalDataAccessor.Instance.DesktopSession).IsPartialPaymentAllowed(GlobalDataAccessor.Instance.CurrentSiteId)) { this.PrinicipalAmount.DataPropertyName = "PartPymtPrinAmt"; dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight; dataGridViewCellStyle5.Format = "C2"; dataGridViewCellStyle5.NullValue = null; this.PrinicipalAmount.DefaultCellStyle = dataGridViewCellStyle5; this.PrinicipalAmount.HeaderText = "Current Prin. Amt"; this.PrinicipalAmount.Name = "PrinAmt"; this.PrinicipalAmount.ReadOnly = true; this.PrinicipalAmount.Width = 100; } // // Status // this.Status.DataPropertyName = "STATUS_CD"; this.Status.HeaderText = "Status"; this.Status.Name = "Status"; this.Status.ReadOnly = true; this.Status.Width = 65; // // UserID // this.UserID.DataPropertyName = "ENT_ID"; this.UserID.HeaderText = "UserID"; this.UserID.Name = "UserID"; this.UserID.ReadOnly = true; this.UserID.Width = 65; this.resultsGrid_dg.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.resultsGrid_dg_CellContentClick); #endregion if (criteria.byDate) { resultsGrid_dg.Columns[4].HeaderText = StringDBMap_Enum <PawnInquiry.searchDateType_enum> .displayValue(criteria.dateType) + " Date / Time"; resultsGrid_dg.Columns[4].DataPropertyName = StringDBMap_Enum <PawnInquiry.searchDateType_enum> .toDBValue(criteria.dateType); } else { resultsGrid_dg.Columns[2].HeaderText = StringDBMap_Enum <PawnInquiry.searchTicketType_enum> .displayValue(criteria.ticketType) + " Tkt #"; resultsGrid_dg.Columns[2].DataPropertyName = StringDBMap_Enum <PawnInquiry.searchTicketType_enum> .toDBValue(criteria.ticketType); } this.Print_btn.Enabled = true; this.Print_btn.Click += new System.EventHandler(this.Print_btn_Click); }
public DataSet getData() { DataSet outputDataSet = getDataSet("PAWN_Inquiries", "get_pawn_data", new List <OracleProcParam> { new OracleProcParam("p_byDate", (byDate) ? "Y" : "N"), new OracleProcParam("p_dateType", StringDBMap_Enum <searchDateType_enum> .toDBValue(dateType)), new OracleProcParam("p_startDate", startDate), new OracleProcParam("p_endDate", endDate), new OracleProcParam("p_ticketType", StringDBMap_Enum <searchTicketType_enum> .toDBValue(ticketType)), new OracleProcParam("p_lowTicket", (lowTicketNumber >= 0) ? lowTicketNumber.ToString() : ""), new OracleProcParam("p_highTicket", (highTicketNumber >= 0) ? highTicketNumber.ToString() : ""), new OracleProcParam("p_lowLoanAmount", (lowAmount >= 0) ? String.Format("{0:f}", lowAmount) : ""), new OracleProcParam("p_highLoanAmount", (highAmount >= 0) ? String.Format("{0:f}", highAmount) : ""), new OracleProcParam("p_Status", StringDBMap_Enum <searchStatus_enum> .toDBValue(status)), new OracleProcParam("p_PFIMailer", pfiMailer), new OracleProcParam("p_userID", userID), new OracleProcParam("p_storenumber", CashlinxDesktopSession.Instance.CurrentSiteId.StoreNumber), new OracleProcParam("p_sort", StringDBMap_Enum <sortField_enum> .toDBValue(sortBy)), new OracleProcParam("p_sortDir", StringDBMap_Enum <sortDir_enum> .toDBValue(sortDir)) }, new Dictionary <string, string> { { "o_pawn_list", "PAWN_INFO" }, { "o_pawn_cust_list", "PAWN_CUST" }, { "o_pawn_mdse_list", "PAWN_MDSE" } }); if (outputDataSet.IsNullOrEmpty()) { return(null); } // need to trap error in the case that referential integrity is not preserved. outputDataSet.Tables["PAWN_INFO"].Columns.Add("CUST_NAME", typeof(string)); string errorType = "Customer"; try { outputDataSet.Relations.Add("customerRelation", outputDataSet.Tables["PAWN_INFO"].Columns["TICKET_NUMBER"], outputDataSet.Tables["PAWN_CUST"].Columns["TICKET_NUMBER"]); errorType = "Merchandise"; outputDataSet.Relations.Add("merchandiseRelation", outputDataSet.Tables["PAWN_INFO"].Columns["TICKET_NUMBER"], outputDataSet.Tables["PAWN_MDSE"].Columns["TICKET_NUMBER"]); } catch { throw new BusinessLogicException(string.Format("An error was detected in the {0} data retreived", errorType)); } if (outputDataSet.DefaultViewManager.DataViewSettings["PAWN_MDSE"] != null) { outputDataSet.DefaultViewManager.DataViewSettings["PAWN_MDSE"].Sort = "TICKET_NUMBER, ICN"; } foreach (DataRow r in outputDataSet.Tables["PAWN_INFO"].Rows) { DataRow[] customer = r.GetChildRows("customerRelation"); r.SetField <string>("CUST_NAME", customer[0].Field <string>("CUST_NAME")); } return(outputDataSet); }
public override string ToString() { string retval = ""; int len = 0; if (byDate) { retval += string.Format("{0} Date: {1} to {2} \n", StringDBMap_Enum <searchDateType_enum> .displayValue(dateType), startDate, endDate); len = StringDBMap_Enum <searchDateType_enum> .displayValue(dateType).Length; } else { if (lowTicketNumber >= 0 || highTicketNumber >= 0) { retval += string.Format("{0} Ticket:", StringDBMap_Enum <searchTicketType_enum> .displayValue(ticketType)); if (lowTicketNumber >= 0 && highTicketNumber >= 0) { retval += string.Format("{0} to {1} \n", lowTicketNumber, highTicketNumber); } else if (lowTicketNumber >= 0) { retval += string.Format("{0}\n", lowTicketNumber); } else { retval += string.Format("{0}\n", highTicketNumber); } len = StringDBMap_Enum <searchDateType_enum> .displayValue(dateType).Length; } } if (status != searchStatus_enum.ALL) { retval += string.Format("Status: {0}\n", StringDBMap_Enum <searchStatus_enum> .displayValue(status)); } //------- if (byDate) { if (sortBy == sortField_enum.DATE) { retval += string.Format("Sorted By: {0} DATE, {1}\n", StringDBMap_Enum <searchDateType_enum> .displayValue(dateType), StringDBMap_Enum <sortDir_enum> .displayValue(sortDir)); } else if (sortBy == sortField_enum.TICKET) { retval += string.Format("Sorted By: Current Ticket #, {0}\n", StringDBMap_Enum <sortDir_enum> .displayValue(sortDir)); } else { retval += string.Format("Sorted By: {0}, {1}\n", StringDBMap_Enum <sortField_enum> .displayValue(sortBy), StringDBMap_Enum <sortDir_enum> .displayValue(sortDir)); } } else { if (sortBy == sortField_enum.DATE) { retval += string.Format("Sorted By: MADE DATE, {0}\n", StringDBMap_Enum <sortDir_enum> .displayValue(sortDir)); } else if (sortBy == sortField_enum.TICKET) { retval += string.Format("Sorted By: {0} Ticket #, {1}\n", StringDBMap_Enum <searchTicketType_enum> .displayValue(ticketType), StringDBMap_Enum <sortDir_enum> .displayValue(sortDir)); } else { retval += string.Format("Sorted By: {0}, {1}\n", StringDBMap_Enum <sortField_enum> .displayValue(sortBy), StringDBMap_Enum <sortDir_enum> .displayValue(sortDir)); } } return(retval); }
public override string ToString() { string retval = ""; if (byDate) { // Transfer Date retval += string.Format("Date: {0} to {1} \n", startDate, endDate); } else { // Transfer Numbers if (lowTransferNumber >= 0 || highTransferNumber >= 0) { if (lowTransferNumber >= 0 && highTransferNumber >= 0) { retval += string.Format("Transfer Number: {0} to {1} \n", lowTransferNumber, highTransferNumber); } else if (lowTransferNumber >= 0) { retval += string.Format("Transfer Number: {0}\n", lowTransferNumber); } else { retval += string.Format("Transfer Number: {0}\n", highTransferNumber); } } } // Transfer Type retval += string.Format("Transfer Type: {0}\n", transferType); // Amount if (this.lowAmount >= 0 || this.highAmount >= 0) { if (lowAmount >= 0 && highAmount >= 0) { retval += string.Format("Amount: {0:C} to {1:C} \n", lowAmount, highAmount); } else if (lowAmount >= 0) { retval += string.Format("Amount: {0:C}\n", lowAmount); } else { retval += string.Format("Amount: {0:C}\n", highAmount); } } // Sources if (this.sourcePrimary.Length != 0 && this.sourceSecondary.Length != 0) { retval += string.Format("Source: {0}, {1}\n", sourcePrimary, sourceSecondary); } else if (this.sourcePrimary.Length != 0) { retval += string.Format("Source: {0}\n", sourcePrimary); } // Destinations if (this.destinationPrimary.Length != 0 && this.destinationSecondary.Length != 0) { retval += string.Format("Destination: {0}, {1}\n", destinationPrimary, destinationSecondary); } else if (this.destinationPrimary.Length != 0) { retval += string.Format("Destination: {0}\n", destinationPrimary); } // Status if (this.status.Length != 0) { retval += string.Format("Current Status: {0}\n", this.status); } // User Id if (this.userID.Length != 0) { retval += string.Format("User Id: {0}\n", this.userID); } // Sort By, Asc, Dsc retval += string.Format("\nSorted By: {0}, {1}\n", StringDBMap_Enum <sortField_enum> .displayValue(sortBy), StringDBMap_Enum <sortDir_enum> .displayValue(sortDir)); return(retval); }