public ActionResult Detail(int?Id, string TargetCode, InfoDetailCustomer?infoDetailCustomer) { ViewBag.InfoDetail = infoDetailCustomer; var customer = new vwCustomer(); if (Id != null) { customer = CustomerRepository.GetvwCustomerById(Id.Value); } if (!string.IsNullOrEmpty(TargetCode)) { customer = CustomerRepository.GetAllvwCustomer() .Where(item => item.Code == TargetCode).FirstOrDefault(); } if (customer != null && customer.IsDeleted != true) { var model = new CustomerViewModel(); AutoMapper.Mapper.Map(customer, model); return(View(model)); } if (Request.UrlReferrer != null) { return(Redirect(Request.UrlReferrer.AbsoluteUri)); } return(RedirectToAction("Index")); }
public static List <vwClaimant> getListClaimantForGrid(List <string> listProductClaimantSelected, vwCustomer customer) { return(dataservices.claimant.getListClaimantForGrid(listProductClaimantSelected, customer)); }
//poziva pri otvaranju prozora AddBoss ali pri editovanju nekog boss public AddCustomerViewModel(AddCustomer addCustomerOpen, vwCustomer CustomerEdit) { customer = CustomerEdit; addCustomer = addCustomerOpen; }
//poziva pri otvaranju prozora AddBoss pri dodavanju novih boss public AddCustomerViewModel(AddCustomer addCustomerOpen) { customer = new vwCustomer(); addCustomer = addCustomerOpen; }
public AddCustomer(vwCustomer officeEdit) { InitializeComponent(); this.DataContext = new AddCustomerViewModel(this, officeEdit); }