public static BuySellDoc UnboxBuySell(ControllerIndexParams parm) { BuySellDoc buySellDoc = parm.Entity as BuySellDoc; buySellDoc.IsNullThrowException("Unable to unbox buySellDoc"); return(buySellDoc); }
public override void Event_ModifyIndexList(IndexListVM indexListVM, ControllerIndexParams parameters) { base.Event_ModifyIndexList(indexListVM, parameters); indexListVM.Heading.Column = "Non Returnable Fees"; indexListVM.Show.EditDeleteAndCreate = true; }
public override void Event_ModifyIndexList(IndexListVM indexListVM, ControllerIndexParams parameters) { base.Event_ModifyIndexList(indexListVM, parameters); //indexListVM.Heading_Column = "Discount Precedence Rules ( Type-Rule-Rank)"; indexListVM.Show.MoveUpMoveDown(true); }
public override void Event_ModifyIndexList(IndexListVM indexListVM, ControllerIndexParams parameters) { base.Event_ModifyIndexList(indexListVM, parameters); indexListVM.Heading.Column = "Cash Payment Methods"; indexListVM.Show.EditDeleteAndCreate = true; }
public override void Event_ModifyIndexList(IndexListVM indexListVM, ControllerIndexParams parameters) { base.Event_ModifyIndexList(indexListVM, parameters); indexListVM.Heading.Column = "Salesman Category"; indexListVM.Show.EditDeleteAndCreate = true; }
//This supplies a dummy MenuPathMain for the Back to List in the Create. protected IMenuManager makeMenuManager(ControllerIndexParams parm) { MenuManager mm = new MenuManager(null, null, null, parm.MenuEnum, parm.BreadCrumbManager, parm.LikeUnlikeCounter, UserId, parm.ReturnUrl, UserName); mm.BreadCrumbManager = parm.BreadCrumbManager; return(mm as IMenuManager); }
public override async Task <IList <ICommonWithId> > GetListForIndexAsync(ControllerIndexParams parameters) { IList <Product> lst = await FindAllAsync(); lst = lst.Where(x => x.IsUnApproved == IsShowUnApproved).ToList() as IList <Product>; return(lst.Cast <ICommonWithId>().ToList()); }
public override void Event_ModifyIndexList(IndexListVM indexListVM, ControllerIndexParams parameters) { base.Event_ModifyIndexList(indexListVM, parameters); indexListVM.Heading.Column = "All Menu Path 1"; indexListVM.IsImageTiled = true; indexListVM.Show.EditDeleteAndCreate = false; }
public override void Event_ModifyIndexList(IndexListVM indexListVM, ControllerIndexParams parameters) { base.Event_ModifyIndexList(indexListVM, parameters); //indexListVM.Heading.Column = "UOM Length"; //indexListVM.Records = "UOM Lengths"; indexListVM.Show.EditDeleteAndCreate = true; }
public override void Event_ModifyIndexList(IndexListVM indexListVM, ControllerIndexParams parameters) { base.Event_ModifyIndexList(indexListVM, parameters); indexListVM.Show.EditDeleteAndCreate = false; indexListVM.Show.Create = true; //indexListVM.Records = "Languages"; }
public override void Event_ModifyIndexList(IndexListVM indexListVM, ControllerIndexParams parameters) { base.Event_ModifyIndexList(indexListVM, parameters); indexListVM.Heading.Column = "[Abbreviation] - Country Name"; // indexListVM.Record = "Country"; indexListVM.Heading.RecordNamePlural = "Countries"; indexListVM.Show.EditDeleteAndCreate = true; }
public override void Event_ModifyIndexList(IndexListVM indexListVM, ControllerIndexParams parameters) { base.Event_ModifyIndexList(indexListVM, parameters); indexListVM.Heading.Column = "[Abbreviation] - State Name"; indexListVM.Show.EditDeleteAndCreate = true; //indexListVM.Show.Record = "State"; //indexListVM.Records = "States"; }
public override void Event_ModifyIndexList(IndexListVM indexListVM, ControllerIndexParams parameters) { base.Event_ModifyIndexList(indexListVM, parameters); indexListVM.Heading.Column = "All Emails for User"; indexListVM.Show.EditDeleteAndCreate = true; indexListVM.Show.VerificationIcon = true; indexListVM.Show.MakeDefaultIcon = true; }
public override void Event_ModifyIndexList(IndexListVM indexListVM, ControllerIndexParams parameters) { base.Event_ModifyIndexList(indexListVM, parameters); indexListVM.Heading.Column = "All Menu Path 3"; indexListVM.IsImageTiled = true; indexListVM.Show.EditDeleteAndCreate = true; //indexListVM.MenuManager.MenuState.MenuDisplayName = "Menu 3"; }
public override void Event_ModifyIndexList(IndexListVM indexListVM, ControllerIndexParams parameters) { base.Event_ModifyIndexList(indexListVM, parameters); indexListVM.Heading.Column = "All Menu Mains"; //indexListVM.MainHeading = "Product Category 3"; //indexListVM.IsImageTiled = true; indexListVM.Show.EditDeleteAndCreate = true; }
public override void Event_ModifyIndexList(IndexListVM indexListVM, ControllerIndexParams parameters) { base.Event_ModifyIndexList(indexListVM, parameters); indexListVM.Heading.Column = "All Uploads"; //indexListVM.MainHeading = "Various Uploads"; indexListVM.IsImageTiled = true; indexListVM.Show.EditDeleteAndCreate = true; }
public override void InitializeMenuManagerForEntity(ControllerIndexParams parm, InterfacesLibrary.SharedNS.ICommonWithId entity) { base.InitializeMenuManagerForEntity(parm, entity); if (!UserId.IsNullOrWhiteSpace()) { Person person = UserBiz.GetPersonFor(UserId); person.IsNullThrowException("person"); entity.MenuManager.UserPersonId = person.Id; } }
public override void Event_ModifyIndexList(IndexListVM indexListVM, ControllerIndexParams parameters) { base.Event_ModifyIndexList(indexListVM, parameters); indexListVM.NameInput1 = "Name"; indexListVM.NameInput2 = "Controller"; indexListVM.Heading.Column = "Visitor Logging"; indexListVM.Show.EditDeleteAndCreate = true; }
public override async Task <IList <ICommonWithId> > GetListForIndexAsync(ControllerIndexParams parms) { List <ICommonWithId> lst = new List <ICommonWithId>(); switch (parms.MenuEnum) { case MenuENUM.IndexMenuPath1: lst = await IndexMenuPath1_DataListAsync(); break; case MenuENUM.IndexMenuPath2: lst = await indexMenuPath2_DataListAsync(parms); break; case MenuENUM.IndexMenuPath3: lst = await indexMenuPath3_DataListAsync(parms); break; case MenuENUM.IndexMenuProduct: lst = await indexProduct_DataListAsync(parms); break; case MenuENUM.IndexMenuProductChild: lst = await indexProductChild_DataListAsync(parms); break; //case MenuENUM.IndexMenuProductChildLandingPage: // lst = await indexProductChildLandingPage_DataListAsync(parms); // break; case MenuENUM.EditMenuPath1: case MenuENUM.EditMenuPath2: case MenuENUM.EditMenuPath3: case MenuENUM.EditMenuPathMain: case MenuENUM.EditMenuProduct: case MenuENUM.EditMenuProductChild: case MenuENUM.CreateMenuPath1: case MenuENUM.CreateMenuPath2: case MenuENUM.CreateMenuPath3: case MenuENUM.CreateMenuPathMenuPathMain: case MenuENUM.CreateMenuProduct: case MenuENUM.CreateMenuProductChild: default: break; } return(lst); }
public override async Task <IList <ICommonWithId> > GetListForIndexAsync(ControllerIndexParams parms) { var lstEntities = await FindAllAsync(); if (lstEntities.IsNullOrEmpty()) { return(null); } if (lstEntities.IsNullOrEmpty()) { return(null); } string personId = GetPersonIdForCurrentUser(); var lstTEntity = lstEntities .Cast <TEntity>().ToList(); //var lstTEntitySelected = lstTEntity // .Where(x => x.People.Any(yield => yield.Id == personId)).ToList(); if (lstTEntity.IsNullOrEmpty()) { return(null); } //get all addresses with this person's Id List <TEntity> tentityList = lstEntities.Where(x => x.PersonId == personId).ToList(); //foreach (var item in lstTEntity) //{ // if (item.People.IsNullOrEmpty()) // continue; // foreach (var pp in item.People) // { // if(pp.Id == personId) // tentityList.Add(item); // } //} var lstIcommonWithId = tentityList .Cast <ICommonWithId>().ToList(); return(lstIcommonWithId); }
public override async Task <IList <ICommonWithId> > GetListForIndexAsync(ControllerIndexParams parms) { List <FileDoc> lst = await FindAllForUserAsync(UserId); if (lst.IsNullOrEmpty()) { return(null); } var lstIcommonWithId = lst.Cast <ICommonWithId>().ToList(); return(lstIcommonWithId); }
public override void Event_ModifyIndexList(IndexListVM indexListVM, ControllerIndexParams parameters) { base.Event_ModifyIndexList(indexListVM, parameters); //indexListVM.Heading_Column = "All Files"; indexListVM.Heading.Column = "All Files"; indexListVM.Show.EditDeleteAndCreate = true; indexListVM.Show.Create = true; indexListVM.NameInput2 = "File Number"; indexListVM.Show.ImageInList = false; }
public override void Event_ModifyIndexList(IndexListVM indexListVM, ControllerIndexParams parameters) { base.Event_ModifyIndexList(indexListVM, parameters); indexListVM.Show.EditDeleteAndCreate = true; indexListVM.IsImageTiled = true; indexListVM.MenuManager.ReturnUrl = parameters.ReturnUrl; indexListVM.Heading.Main = "Seller Product"; if (IsShowHidden) { indexListVM.Heading.Main = "Seller Product (Hidden)"; } }
private async Task <List <ICommonWithId> > indexMenuPath3_DataListAsync(ControllerIndexParams parms) { parms.MenuPathMainId.IsNullOrWhiteSpaceThrowException("Main Menu Path Id not received."); MenuPathMain mpm = await FindAsync(parms.MenuPathMainId); mpm.IsNullThrowException("MenuPathMain not found."); List <MenuPathMain> uniqueListOfMainPaths = UniqueListOfMainPath_IDs(mpm.MenuPath1Id, mpm.MenuPath2Id); //=========================================== List <MenuPathMain> mpms_Distinct_With_Live_Products_And_Shops = get_All_Live_Products_And_Shops(); //=========================================== //update the count of Menu2Path MenuPath2 mp2 = MenuPathMainBiz.MenuPath2Biz.FindAll().FirstOrDefault(x => x.Id == mpm.MenuPath2Id); if (!mp2.IsNull()) { if (!UserId.IsNullOrWhiteSpace()) { //these can be wrng if they also describe other paths //this is how many times this particular picture has been clicked mp2.NoOfVisits.AddOne(UserId, UserName); await MenuPathMainBiz.MenuPath2Biz.UpdateAndSaveAsync(mp2); } } if (uniqueListOfMainPaths.IsNullOrEmpty()) { return(null); } foreach (MenuPathMain mpm2 in uniqueListOfMainPaths) { //check to see if these items have any sale items if (mpms_Distinct_With_Live_Products_And_Shops.Contains(mpm2)) { mpm2.HasLiveProductChildren = true; mpm2.NoOfItems = mpm2.ProductChildren_Fixed_Not_Hidden.Count; mpm2.NoOfShops = mpm2.Product_Shops_Not_Expired.Count; } } List <ICommonWithId> mpmlst = uniqueListOfMainPaths.Cast <ICommonWithId>().ToList(); return(mpmlst); }
/// <summary> /// When the Product is created from the productMenu, then its; menuPathMainId is sent along with it /// This will be its first MenuPathMain. User can add more as required. /// </summary> /// <param name="parm"></param> /// <param name="product"></param> private void addMenuPathMainSentFromView(ControllerIndexParams parm, Product product) { if (!parm.MenuPathMainId.IsNullOrWhiteSpace()) { if (product.MenuPathMains.IsNull()) { product.MenuPathMains = new List <MenuPathMain>(); } MenuPathMain mpm = MenuPathMainBiz.Find(parm.MenuPathMainId); mpm.IsNullThrowException("Menu Path main not found"); product.MenuPathMains.Add(mpm); } }
public override async Task <IList <ICommonWithId> > GetListForIndexAsync(ControllerIndexParams parms) { //first get a list of all the people List <Person> peopleList = await FindAllAsync(); List <Person> peopleFoundLst = ListOfPeopleForUser(UserId, peopleList); if (peopleFoundLst.IsNullOrEmpty()) { return(null); } //cast and return the list var lstIcommonwithId = peopleFoundLst.Cast <ICommonWithId>().ToList(); return(lstIcommonwithId); }
//this returns a list of checked boxes marked true //public List<CheckBoxItem> LoadMenuPathCheckedBoxes(IProduct product, MenuPath1ENUM menuPath1Enum = MenuPath1ENUM.Unknown) //Note, the MenuPath1 of the Product should have the correct Menupath or a MenuPath1 has to be passed. public void LoadMenuPathCheckedBoxes(ControllerIndexParams parm) { Product product = Product.Unbox(parm.Entity); addMenuPathMainSentFromView(parm, product); List <CheckBoxItem> checkedboxes = CreateCheckBoxes(); markProductSelectedCheckBoxesTrue(product, checkedboxes); //new code to create CheckBoxList //this creates the check box list which are in the view. //helps to make the chk boxes collapsable product.Mp1List = createCheckBoxListFrom(checkedboxes); product.CheckedBoxesList = checkedboxes; }
public override async Task <IList <ICommonWithId> > GetListForIndexAsync(ControllerIndexParams parms) { // errIfNotLoggedIn(); var lst = (await base.GetListForIndexAsync(parms)); if (lst.IsNullOrEmpty()) { return(null); } var lstIcommonwithId = (lst .Cast <TEntity>() .Where(x => x.UserId == UserId)) .Cast <ICommonWithId>().ToList(); return(lstIcommonwithId); }
public override async Task <IList <ICommonWithId> > GetListForIndexAsync(ControllerIndexParams parms) { //get user's customer and owner Customer customer = CustomerBiz.GetPlayerFor(UserId); Owner owner = OwnerBiz.GetPlayerFor(UserId); //now, get all the payment trx for this person List <BuySellDoc> allTrx = await FindAllAsync(); List <BuySellDoc> filteredTrx; //now reduce this list so the user is customer or seller if (customer.IsNull()) { if (owner.IsNull()) { //filteredTrx = allTrx.Where(x => x.CustomerId == customerId).AsQueryable(); return(null); } else { filteredTrx = allTrx.Where(x => x.OwnerId == owner.Id).ToList(); } } else { if (owner.IsNull()) { filteredTrx = allTrx.Where(x => x.CustomerId == customer.Id).ToList(); } else { filteredTrx = allTrx.Where(x => x.CustomerId == customer.Id || x.OwnerId == owner.Id).ToList(); } } //cast and return the list var lstIcommonwithId = allTrx.Cast <ICommonWithId>().ToList(); return(lstIcommonwithId); }
/// <summary> /// This will return Product Children. /// </summary> /// <param name="parms"></param> /// <returns></returns> private async Task <List <ICommonWithId> > indexProductChild_DataListAsync(ControllerIndexParams parms) { //Get the product parms.ProductId.IsNullOrWhiteSpaceThrowException(); Product product = await ProductBiz.FindAsync(parms.ProductId); //parent product cannot be null. It is some kind of programming error if it is. product.IsNullThrowException(string.Format("Product not found. Id ='{0}'", parms.ProductId)); //update the number of visits if (!UserId.IsNullOrWhiteSpace()) { product.NoOfVisits.AddOne(UserId, UserName); await ProductBiz.UpdateAndSaveAsync(product); } //get all its child products and display them List <ProductChild> children; //see if the product is a shop if (product.OwnerId.IsNullOrWhiteSpace()) { //this is not a shop. children = productChildren(product); } else { //this is a shop children = shopChildren(product); } if (children.IsNullOrEmpty()) { return(null); } List <ICommonWithId> childrenAsIcommonLst = children.Cast <ICommonWithId>().ToList(); return(childrenAsIcommonLst); }