private void ShowPaymentDatails(long p) { var result = new ExpensesManager().GetExpenseDetails(p); if (result != null) { txtInvoiceNo.Text = result.InvoiceCode; txtValue.Text = result.ExpenseValue.ToString(); txtNotes.Text = result.Notes; txtPaymentDate.Text = MinutesuaeConcrete.GetDateOnly(result.PaymentDate); //txt.Text = MinutesuaeConcrete.GetDateOnly(result.DueDate); rblCompanyType.SelectedValue = result.CompanyType; rblCompanyType_SelectedIndexChanged(rblCompanyType, new EventArgs()); ddlCurrencyUsed.SelectedValue = result.Currency_ID.ToString(); //ddlExpenseType.SelectedValue = result.ExpenseType_ID.ToString(); ddlDueforCompany.SelectedValue = result.Company_ID.ToString(); ddlExchangeCo.SelectedValue = result.ExchangeCompany_ID.ToString(); //lblCompanyCode.Text = result.Car_ID.ToString(); //linkCancel.NavigateUrl = "car/" + lblCompanyCode.Text + "/expenses.aspx"; //cbActive.Checked = (bool)result.Active; } }
private void ShowInvoiceDetails(long p) { var result = new SaleInvoicesManager().GetCarSaleInvoiceDetails(p); if (result != null) { divArrivalDate.InnerHtml = MinutesuaeConcrete.GetDateOnly(result.arrive_date, "dd/MM/yyyy"); divCarModel.InnerHtml = string.Format("{0} - {1}", result.MarkerNameEn, result.TypeNameEn); divCarNo.InnerHtml = result.engine_no; divChassisNo.InnerHtml = result.chassis_no; divColor.InnerHtml = result.ExtColorEn; divLotNo.InnerHtml = result.lot_no; divYear.InnerHtml = result.YearNameEn; divClient.InnerHtml = result.ClientName; divDescription.InnerHtml = result.Notes; divEmail.InnerHtml = result.CompEmail; divFax.InnerHtml = result.CompFax; divFirst.InnerHtml = string.Format("{0:F} {1}", result.FirstAmount, result.CurrencySymbol); divLotNo.InnerHtml = result.lot_no; divName.InnerHtml = result.CompName; divPhone.InnerHtml = result.CompPhone; divPrice.InnerHtml = string.Format("{0:F} {1}", result.SalePrice, result.CurrencySymbol); divWebsite.InnerHtml = result.CmopWebsite; divBillStatus.InnerHtml = result.Active == false ? "Canceled" : ""; imgMain.ImageUrl += result.main_picture != null ? result.main_picture : "no_photo.jpg"; // Go to list. string url = "client/" + result.Client_ID + "/invoices/" + MinutesuaeConcrete.ToSeoUrl(result.ClientName) + ".aspx"; lnkGoList.Attributes.Add("href", url); } }
private void ShowMainSafeDetails(int id) { var safe = new SafeMainManager().GetMainSafeDebitDetails(id); if (safe != null) { hfId.Value = safe.SafeID.ToString(); txtValue.Text = safe.SafeDebitValue; txtAddDate.Text = MinutesuaeConcrete.GetDateOnly(safe.SafeDebitDate); ddlEmployee.SelectedValue = safe.Employee_ID.ToString(); ddlStore.SelectedValue = safe.Store_ID.ToString(); } else { lblError.Text = Resources.AdminResources_en.DataNotFound; } }
private void ShowCarDetails(string p) { var result = new CarsManager().GetCarDetails(int.Parse(p)); if (result != null) { divArrivalDate.InnerHtml = MinutesuaeConcrete.GetDateOnly(result.arrive_date); divCarModel.InnerHtml = result.MarkerNameEn + " " + result.TypeNameEn; divCarNo.InnerHtml = result.engine_no; divChassisNo.InnerHtml = result.chassis_no; divColor.InnerHtml = result.ColorNameEn; divLotNo.InnerHtml = result.lot_no; divYear.InnerHtml = result.YearNameEn; hfExpensesVal.Text = string.Format("{0:F}", result.CarTotalExpensesDollar); imgMain.ImageUrl += result.main_picture != null ? result.main_picture : "no_photo.jpg"; //imgMain.Visible = (result.main_picture != null); } }
private void ShowClientPaymentInformation(int Id) { var result = new ClientPaymentsManager().GetClientPaymentDetails(Id); if (result != null) { //hfID.Value = result.ClientPaymentID.ToString(); txtDate.Text = MinutesuaeConcrete.GetDateOnly(result.PaymentDate); txtPaymentValue.Text = result.PaymentValue.ToString(); txtReceivedName.Text = result.ReceiverName; txtShortdesc.Text = result.Notes; //cbActive.Checked = (bool)result.Active; ddlClients.SelectedValue = result.Client_ID.ToString(); ddlCurrency.SelectedValue = result.Currency_ID.ToString(); ddlExchangeCo.SelectedValue = result.ExchangeCompany_ID.ToString(); if (result.Invoice_ID != null) { ltlInvoiceID.Text = result.Invoice_ID.ToString(); } } }
private void ShowCarInformation(int Id) { var result = new CarsManager().GetCarDetails(Id); if (result != null) { cbActive.Checked = (bool)result.active; txtcontainer_no.Text = result.container_no; txtContainerCode.Text = result.container_code; txtPolyFielding.Text = result.poly_fielding; txtBookingNo.Text = result.booking_no; if (result.arrive_date != null) { txtArrivael_Date.Text = MinutesuaeConcrete.GetDateOnly(result.arrive_date); } txtchassis_no.Text = result.chassis_no; if (result.checkout_date != null) { txtCheckoutDate.Text = MinutesuaeConcrete.GetDateOnly(result.checkout_date); } txtCode.Text = result.car_code.ToString(); if (result.cost != null) { txtCost.Text = result.cost.ToString(); } txtCustomsNo.Text = result.Customs_No; txtEngine_no.Text = result.engine_no; txtLot_no.Text = result.lot_no; txtMileage.Text = result.mileage; if (result.real_price != null) { txtreal_price.Text = result.real_price.ToString(); } txtRemarks.Text = result.car_remarks; if (result.sale_date != null) { txtSaleDate.Text = MinutesuaeConcrete.GetDateOnly(result.sale_date); } if (result.sale_price != null) { txtSalePrice.Text = result.sale_price.ToString(); } txtSaleTo.Text = result.sale_to; if (result.Shipping_date != null) { txtShippingDate.Text = MinutesuaeConcrete.GetDateOnly(result.Shipping_date); } if (result.WorkshopEntryDate != null) { txtWorkshopEntryDate.Text = MinutesuaeConcrete.GetDateOnly(result.WorkshopEntryDate); } if (result.WorkshopExitDate != null) { txtWorkshopExitDate.Text = MinutesuaeConcrete.GetDateOnly(result.WorkshopExitDate); } if (result.expected_arrive_date != null) { txtExpectedArrivalDate.Text = MinutesuaeConcrete.GetDateOnly(result.expected_arrive_date); } if (result.dubia_arrive_date != null) { txtDubiaArrivalDate.Text = MinutesuaeConcrete.GetDateOnly(result.dubia_arrive_date); } if (result.sharjah_arrive_date != null) { txtSharjahArrivalDate.Text = MinutesuaeConcrete.GetDateOnly(result.sharjah_arrive_date); } txtPurchaseDate.Text = string.Format("{0:MM/dd/yyyy}", result.purchase_date); //if (result.Auction_ID != null) { ddlAuctions.SelectedValue = result.Auction_ID.ToString(); } //ddlAuctions_SelectedIndexChanged(ddlAuctions, new EventArgs()); //if (result.Buyer_ID != null) { ddlBuyers.SelectedValue = result.Buyer_ID.ToString(); } if (result.body_style != null) { ddlbody_style.SelectedValue = result.body_style.ToString(); } if (result.car_capacity != null) { ddlcar_capacity.SelectedValue = result.car_capacity.ToString(); } if (result.car_drive != null) { ddlCar_drive.SelectedValue = result.car_drive.ToString(); } if (result.car_engine != null) { ddlCar_engine.SelectedValue = result.car_engine.ToString(); } if (result.car_transmission != null) { ddlcar_transmission.SelectedValue = result.car_transmission.ToString(); } if (result.CurrencyExchange_ID != null) { ddlCurrency.SelectedValue = result.CurrencyExchange_ID.ToString(); } if (result.exterior_color != null) { ddlexterior_color.SelectedValue = result.exterior_color.ToString(); } if (result.interior_color != null) { ddlinterior_color.SelectedValue = result.interior_color.ToString(); } if (result.Store_ID != null) { ddlStores.SelectedValue = result.Store_ID.ToString(); } //if (result.Transport_ID != null) { ddlTransferes.SelectedValue = result.Transport_ID.ToString(); } if (result.Marker_ID != null) { ddlMarkers.SelectedValue = result.Marker_ID.ToString(); } ddlMarkers_SelectedIndexChanged(ddlMarkers, new EventArgs()); if (result.Model_ID != null) { ddlModels.SelectedValue = result.Model_ID.ToString(); } if (result.PortShipping_ID != null) { ddlPortShipping_ID.SelectedValue = result.PortShipping_ID.ToString(); } if (result.Ship_ID != null) { ddlShip_ID.SelectedValue = result.Ship_ID.ToString(); } if (result.ShippingCompany_ID != null) { ddlShippingCompany_ID.SelectedValue = result.ShippingCompany_ID.ToString(); } //if (result.State_ID != null) { ddlState_ID.SelectedValue = result.State_ID.ToString(); } //ddlState_ID_SelectedIndexChanged(ddlState_ID, new EventArgs()); if (result.featured_car != null && (bool)result.featured_car == true) { rblFeatures.SelectedValue = "true"; } //if (result.Region_ID != null) { ddlRegion_ID.SelectedValue = result.Region_ID.ToString(); } if (result.WorkingStatus_ID != null) { ddlWorkingStatus_ID.SelectedValue = result.WorkingStatus_ID.ToString(); } if (result.Workshop_ID != null) { ddlWorkshop_ID.SelectedValue = result.Workshop_ID.ToString(); } if (result.Year_ID != null) { ddlYears.SelectedValue = result.Year_ID.ToString(); } hfVisitors.Value = ((result.visitors != null) ? (result.visitors.ToString()) : "0"); hfTransferStatus.Value = ((result.TransferStatus_ID != null) ? (result.TransferStatus_ID.ToString()) : "1"); hfMain_Picture.Value = ((result.main_picture != null) ? (result.main_picture) : ""); if (result.car_options != null) { ShowOptions(result.car_options); } } }