public ActionResult AcctNewContact() { ViewBag.Message = "Your Accounts page."; string contactId = Request.QueryString["contactId"]; BusinessDelegate obj = new BusinessDelegate(); string salutation = Request.QueryString["salutation"]; string firstName = Request.Params["firstName"]; string lastName = Request.Params["lastName"]; string acctId = Request.QueryString["acctId"]; Console.WriteLine("Inside Controller AcctNewContact salutation:" + salutation + ": firstName :" + firstName + ": lastName :" + lastName + ": acct Id:" + acctId + ":"); if (string.IsNullOrEmpty(firstName) != true) { Contact contact = new Contact(); contact.Salutation = salutation; contact.FirstName = firstName; contact.LastName = lastName; contact.AccountId = acctId; obj.createContact(contact); } ViewData["AccountId"] = acctId; return(View()); }
// Single Account public ActionResult SingleAccount() { ViewBag.Message = "Your Accounts page."; string acctId = Request.QueryString["acctId"]; string editFlag = Request.Params["editFlag"]; Console.WriteLine("Inside Controller SingleAccount Acct Id:" + acctId + ": Edit Flag :" + editFlag + ":"); BusinessDelegate obj = new BusinessDelegate(); if (editFlag.Equals("0")) // READ { obj.getAccount(acctId); ViewData["AccountList"] = obj.accountsList; } else if (editFlag.Equals("1")) // UPDATE { List <Account> accountsList = new System.Collections.Generic.List <Account>(); ViewData["AccountList"] = accountsList; } else // DELETE { obj.deleteAccount(acctId); List <Account> accountsList = new System.Collections.Generic.List <Account>(); ViewData["AccountList"] = accountsList; } return(View()); }
// Load All Accounts public ActionResult Accounts() { ViewBag.Message = "Your Accounts page."; BusinessDelegate obj = new BusinessDelegate(); obj.getAccounts(); ViewData["AccountList"] = obj.accountsList; return(View()); }
public static void Main(string[] args) { BusinessDelegate businessDelegate = new BusinessDelegate(); businessDelegate.setServiceType("EJB"); Client client = new Client(businessDelegate); client.doTask(); businessDelegate.setServiceType("JMS"); client.doTask(); }
public static void Output() { var businessDelegate = new BusinessDelegate(); businessDelegate.SetServiceType("EJB"); var client = new ClientBusiness(businessDelegate); client.DoTask(); businessDelegate.SetServiceType("JMS"); client.DoTask(); }
public ActionResult AcctContact() { ViewBag.Message = "Your Accounts page."; string contactId = Request.QueryString["contactId"]; BusinessDelegate obj = new BusinessDelegate(); obj.getContact(contactId); ViewData["ContactList"] = obj.contactList; return(View()); }
public void Main() { BusinessDelegate businessDelegate = new BusinessDelegate(); businessDelegate.SetServerType("EJB"); Client client = new Client(businessDelegate); client.DoTask(); businessDelegate.SetServerType("JMS"); client.DoTask(); }
public Client(BusinessDelegate businessService) { this._businessService = businessService; }
public Client(BusinessDelegate businessDelegate) { _businessDelegate = businessDelegate; }
public ClientBusiness(BusinessDelegate businessService) { _businessService = businessService; }