//My Biling public async Task <ActionResult> MyBillableTime() { try { MyBillingModel returnModel = new MyBillingModel(); ClaimTeamLoginModel client = (ClaimTeamLoginModel)Session[SessionHelper.claimTeamLogin]; string UserId = client.UserId; BillingSimpleRepo billingSimpleRepo = new BillingSimpleRepo(); var CustomerList = await billingSimpleRepo.GetCustomerList(UserId); var ServeiceUserList = await billingSimpleRepo.GetServeiceUserList(); var removeitem = ServeiceUserList.SingleOrDefault(r => r.Code == UserId); if (removeitem != null) { ServeiceUserList.Remove(removeitem); } ServeiceUserList.Insert(0, removeitem); CustomerList.Insert(0, new CustomerUserModel()); returnModel.CustomerUserModel = CustomerList; returnModel.ServicesUserModel = ServeiceUserList; return(View(returnModel)); } catch (Exception ex) { throw ex; } }
public async Task <ActionResult> TeamGetMyBillableTimes(string showMe, string customerId, string serviceUserId, string serviceFromDate, string serviceToDate) { try { List <BillingSimpleModel> list = new List <BillingSimpleModel>(); BillingSimpleRepo billingSimpleRepo = new BillingSimpleRepo(); list = await billingSimpleRepo.TeamGetMyBillableTimes(showMe, customerId, serviceUserId, serviceFromDate, serviceToDate); return(Json(new { d = list, total = list.Count }, JsonRequestBehavior.AllowGet)); } catch (Exception ex) { throw ex; } }