public async Task <ActionResult> Create(CallDetailsModel uploads)
        {
            uploads.UserId    = CurrentUser.UserId;
            uploads.CompanyId = CurrentUser.CompanyId;
            //if (CurrentUser.UserRole.ToLower().Contains("client"))
            // uploads.ClientId = CurrentUser.RefKey;
            uploads.EventAction = 'I';
            var response = await _RepoCallLog.AddOrEditCallLog(uploads);

            if (response.IsSuccess)
            {
                var Templates = await _templateRepo.GetTemplateByActionId((int)EmailActions.CALL_REGISTRATION, CurrentUser.CompanyId);

                CurrentUser.Email = uploads.CustomerEmail;
                var WildCards = CommonModel.GetWildCards(CurrentUser.CompanyId);
                var U         = WildCards.Where(x => x.Text.ToUpper() == "NAME").FirstOrDefault();
                U.Val = uploads.CustomerName;
                U     = WildCards.Where(x => x.Text.ToUpper() == "CALL ID").FirstOrDefault();
                U.Val = response.result;
                U     = WildCards.Where(x => x.Text.ToUpper() == "CUSTOMER SUPPORT NUMBER").FirstOrDefault();
                U.Val = CurrentUser.CustomerCareNumber;
                U     = WildCards.Where(x => x.Text.ToUpper() == "CUSTOMER SUPPORT EMAIL").FirstOrDefault();
                U.Val = CurrentUser.ContactCareEmail;
                CurrentUser.Mobile = uploads.CustomerContactNumber;
                var c = WildCards.Where(x => x.Val != string.Empty).ToList();
                if (Templates.Count > 0)
                {
                    await _emailSmsServices.Send(Templates, c, CurrentUser);
                }
            }

            TempData["response"] = response;
            return(RedirectToAction("Index"));
        }
        public JsonResult GetFriendCallDetailsPrep([DataSourceRequest] DataSourceRequest request, int dateIndex, string friendFbId)
        {
            IList <DateTime> dateRange = CallDetailsModel.GetDateRange();
            string           startDate = String.Format("{0:dd'/'MM'/'yyyy}", dateRange[dateIndex + 1]);
            string           endDate   = String.Format("{0:dd'/'MM'/'yyyy}", dateRange[dateIndex]);

            ServiceManager.ServiceHandlers.CallDetailHandler srvHandler = new CallDetailHandler();

            var srvData = srvHandler.PrepareData(startDate, endDate);

            IList <CallDetailModel> modelList = (from u in srvData
                                                 join p in UserFb.Friends on LIB.StringHelper.Right(u.OpAddress.TrimEnd(), 10) equals p.Msisdn
                                                 into a
                                                 from f in a.DefaultIfEmpty(new UserFbFriendModel())
                                                 select new CallDetailModel
            {
                Amount = u.Amount,
                DataVolume = u.DataVolume,
                DateDisplay = u.DateDisplay,
                Description = u.Description,
                OpAddress = ProjectUtil.CallDetailOpAddres(u.OpAddress, session.IsSubscriptionActive),
                PictureLink = f.PictureLink,
                UserId = f.UserId,
                FbId = f.FbId,
                FirstNameView = f.FirstNameView,
                IsClickToCallBlock = f.IsClickToCallBlock,
                IsClickToCallInvisible = f.IsClickToCallInvisible,
                LastNameView = f.LastNameView,
            })
                                                .Where(f => f.FbId == friendFbId)
                                                .ToList();

            return(Json(modelList.ToList(), JsonRequestBehavior.AllowGet));
        }
Beispiel #3
0
        public async Task <ActionResult> Edit(CallDetailsModel Appointment)
        {
            if (ModelState.IsValid)
            {
                var response = await _centerRepo.EditCallAppointment(Appointment);

                TempData["response"] = response;
                return(RedirectToAction("Index"));
            }
            else
            {
                var filter = new FilterModel {
                    CompId = CurrentUser.CompanyId
                };
                Appointment.BrandList        = new SelectList(_dropdown.BindBrand(CurrentUser.CompanyId), "Value", "Text");
                Appointment.CategoryList     = new SelectList(_dropdown.BindCategory(CurrentUser.CompanyId), "Value", "Text");
                Appointment.ProductList      = new SelectList(_dropdown.BindProduct(Appointment.DeviceBrandId), "Value", "Text");
                Appointment.ServiceTypeList  = new SelectList(await CommonModel.GetServiceType(filter), "Value", "Text");
                Appointment.DeliveryTypeList = new SelectList(await CommonModel.GetDeliveryServiceType(filter), "Value", "Text");
                Appointment.CustomerTypeList = new SelectList(await CommonModel.GetLookup("Customer Type"), "Value", "Text");
                Appointment.ConditionList    = new SelectList(await CommonModel.GetLookup("Device Condition"), "Value", "Text");
                Appointment.AddressTypelist  = new SelectList(await CommonModel.GetLookup("Address"), "Value", "Text");
                Appointment.CountryList      = new SelectList(_dropdown.BindCountry(), "Value", "Text");
                Appointment.StatusList       = new SelectList(_dropdown.BindCallStatusNew(), "Value", "Text");

                return(View(Appointment));
            }
        }
        public async Task <ActionResult> Create()
        {
            var filter = new FilterModel {
                CompId = CurrentUser.CompanyId, IsExport = false
            };
            // var Newcalls = await _customerSupport.GetASPCalls(filter);
            var Newcalls = new CallDetailsModel();

            Newcalls.ServiceTypeList = new SelectList(await CommonModel.GetServiceType(filter), "Value", "Text");

            // IsAssingedCall = true,
            Newcalls.DeliveryTypeList = new SelectList(await CommonModel.GetDeliveryServiceType(filter), "Value", "Text");
            Newcalls.BrandList        = new SelectList(_dropdown.BindBrand(CurrentUser.CompanyId), "Value", "Text");
            Newcalls.CategoryList     = new SelectList(_dropdown.BindCategory(CurrentUser.CompanyId), "Value", "Text");
            Newcalls.SubCategoryList  = new SelectList(Enumerable.Empty <SelectListItem>());
            Newcalls.ProductList      = new SelectList(Enumerable.Empty <SelectListItem>());
            Newcalls.CustomerTypeList = new SelectList(await CommonModel.GetLookup("Customer Type"), "Value", "Text");
            Newcalls.ConditionList    = new SelectList(await CommonModel.GetLookup("Device Condition"), "Value", "Text");
            // calls.IsClient = IsClient,
            Newcalls.StatusList      = new SelectList(await CommonModel.GetStatusTypes("Customer support"), "Value", "Text");
            Newcalls.AddressTypelist = new SelectList(await CommonModel.GetLookup("ADDRESS"), "Value", "Text");
            Newcalls.LocationList    = new SelectList(Enumerable.Empty <SelectListItem>());
            //Newcalls.ClientId = 101;
            Newcalls.DataSourceId = 102;
            return(View(Newcalls));
        }
Beispiel #5
0
        public async Task <ResponseModel> EditCallAppointment(CallDetailsModel cam)
        {
            List <SqlParameter> sp    = new List <SqlParameter>();
            SqlParameter        param = new SqlParameter("@DeviceId", ToDBNull(cam.DeviceId));

            sp.Add(param);
            param = new SqlParameter("@altcontactnumber", ToDBNull(cam.CustomerAltConNumber));
            sp.Add(param);
            param = new SqlParameter("@appointmentdate", ToDBNull(cam.AppointmentDate));
            sp.Add(param);
            param = new SqlParameter("@remark", ToDBNull(cam.Remarks));
            sp.Add(param);
            param = new SqlParameter("@StatusId", ToDBNull(cam.StatusId));
            sp.Add(param);
            param = new SqlParameter("@UserId", ToDBNull(cam.UserId));
            sp.Add(param);
            var sql = "UpdateAppointmentDetail @DeviceId,@altcontactnumber,@appointmentdate,@remark,@StatusId,@UserId";
            var res = await _context.Database.SqlQuery <ResponseModel>(sql, sp.ToArray()).SingleOrDefaultAsync();

            if (res.ResponseCode == 1)
            {
                res.IsSuccess = true;
            }
            else
            {
                res.IsSuccess = false;
            }
            return(res);
        }
Beispiel #6
0
        public async Task <CallDetailsModel> GetCallsDetailsById(string CRN)
        {
            var call = new CallDetailsModel();

            using (var connection = _context.Database.Connection)
            {
                SqlParameter param = new SqlParameter("@CallId", ToDBNull(CRN));
                connection.Open();
                var command = connection.CreateCommand();
                command.CommandText = "GetCallDetailsByCallId";
                command.CommandType = CommandType.StoredProcedure;
                command.Parameters.Add(param);
                using (var reader = await command.ExecuteReaderAsync())
                {
                    call =
                        ((IObjectContextAdapter)_context)
                        .ObjectContext
                        .Translate <CallDetailsModel>(reader)
                        .SingleOrDefault();
                    //Add This
                    reader.NextResult();

                    call.Parts =
                        ((IObjectContextAdapter)_context)
                        .ObjectContext
                        .Translate <PartsDetailsModel>(reader)
                        .ToList();
                }
            }

            return(call);

            //SqlParameter callDetails = new SqlParameter("@CallId", CRN);
            //return await _context.Database.SqlQuery<CallDetailsModel>("GetCallDetailsByCallId @CallId", callDetails).SingleOrDefaultAsync();
        }
        public PartialViewResult DetailPeriodSelector()
        {
            // 7 ser günlük, 2 ay gecmise kadar giden tarih araligi hesaplamasi
            var model = new CallDetailsModel();

            model.DateRange = CallDetailsModel.GetDateRange();

            return(PartialView(model));
        }
        public PartialViewResult FriendPeriodSelector(string Id)
        {
            ViewBag.FbId = Id;
            // 7 ser günlük, 2 ay gecmise kadar giden tarih araligi hesaplamasi
            var model = new CallDetailsModel();

            model.DateRange = CallDetailsModel.GetDateRange();

            return(PartialView(model));
        }
Beispiel #9
0
        public async Task <ActionResult> EditAppointment(CallDetailsModel Appointment)
        {
            try
            {
                var response = await _centerRepo.EditCallAppointment(Appointment);

                TempData["response"] = response;
                return(RedirectToAction("AcceptCalls"));
            }
            catch (Exception ex)
            {
                var response = new ResponseModel {
                    Response = ex.Message, IsSuccess = false
                };
                TempData["response"] = response;
                TempData.Keep("response");
                return(RedirectToAction("AcceptCalls"));
            }
        }
Beispiel #10
0
        public async Task <ResponseModel> AddOrEditCallLog(CallDetailsModel Call)
        {
            var sp     = new List <SqlParameter>();
            var pararm = new SqlParameter("@ID", ToDBNull(Call.Id));

            sp.Add(pararm);
            pararm = new SqlParameter("@CLIENTID", ToDBNull(Call.ClientId));
            sp.Add(pararm);
            pararm = new SqlParameter("@isExistingCustomer", Call.IsExistingCustomer);
            sp.Add(pararm);
            pararm = new SqlParameter("@CustMobileNubmer", ToDBNull(Call.CustomerContactNumber));
            sp.Add(pararm);
            pararm = new SqlParameter("@CustType", Call.CustomerTypeId);
            sp.Add(pararm);
            pararm = new SqlParameter("@CustName", Call.CustomerName);
            sp.Add(pararm);
            pararm = new SqlParameter("@CustAltCont", ToDBNull(Call.CustomerAltConNumber));
            sp.Add(pararm);
            pararm = new SqlParameter("@CustEmail", ToDBNull(Call.CustomerEmail));
            sp.Add(pararm);
            pararm = new SqlParameter("@AddressTypeId", Call.AddressTypeId);
            sp.Add(pararm);
            pararm = new SqlParameter("@Address", ToDBNull(Call.Address));
            sp.Add(pararm);
            pararm = new SqlParameter("@Landmark", ToDBNull(Call.NearLocation));
            sp.Add(pararm);
            pararm = new SqlParameter("@PinCode", ToDBNull(Call.PinNumber));
            sp.Add(pararm);
            pararm = new SqlParameter("@LocationId", ToDBNull(Call.LocationId));
            sp.Add(pararm);
            pararm = new SqlParameter("@City", ToDBNull(Call.District));
            sp.Add(pararm);
            pararm = new SqlParameter("@DEVICECATEGORYID", ToDBNull(Call.DeviceCategoryId));
            sp.Add(pararm);
            pararm = new SqlParameter("@DEVICEBRANDID", ToDBNull(Call.DeviceBrandId));
            sp.Add(pararm);
            pararm = new SqlParameter("@DEVICEMODELID", ToDBNull(Call.DeviceModalId));
            sp.Add(pararm);
            pararm = new SqlParameter("@SLN", ToDBNull(Call.DeviceSn));
            sp.Add(pararm);
            pararm = new SqlParameter("@IMEI1", ToDBNull(Call.DeviceIMEIOne));
            sp.Add(pararm);
            pararm = new SqlParameter("@IMEI2", ToDBNull(Call.DeviceIMEISecond));
            sp.Add(pararm);
            pararm = new SqlParameter("@DEVICEPURCHASEFROM", ToDBNull(Call.PurchaseFrom));
            sp.Add(pararm);
            //pararm = new SqlParameter("@DOP", ToDBNull(DateTime.ParseExact(Call.DOP, "dd/MM/yyyy", CultureInfo.InvariantCulture)));
            pararm = new SqlParameter("@DOP", ToDBNull((Call.DOP != null) ? DateTime.ParseExact(Call.DOP, "dd/MM/yyyy", CultureInfo.InvariantCulture) : Call.AppointmentDate));
            sp.Add(pararm);
            pararm = new SqlParameter("@BILLNUBMER", ToDBNull(Call.BillNo));
            sp.Add(pararm);
            pararm = new SqlParameter("@BILLAMOUNT", ToDBNull(Call.BillAmount));
            sp.Add(pararm);
            pararm = new SqlParameter("@DEVICECONDITIONID", ToDBNull(Call.DeviceConditionId));
            sp.Add(pararm);
            pararm = new SqlParameter("@SERVICETYPEID", ToDBNull(Call.ServiceTypeId));
            sp.Add(pararm);
            pararm = new SqlParameter("@DELIVERYTYPEID", ToDBNull(Call.DeliveryTypeId));
            sp.Add(pararm);
            pararm = new SqlParameter("@ACTION", Call.EventAction);
            sp.Add(pararm);
            pararm = new SqlParameter("@USERID", Call.UserId);
            sp.Add(pararm);
            pararm = new SqlParameter("@CompanyId", ToDBNull(Call.CompanyId));
            sp.Add(pararm);
            pararm = new SqlParameter("@DEVICEID", ToDBNull(Call.DeviceId));
            sp.Add(pararm);
            pararm = new SqlParameter("@CUSTOMERID", ToDBNull(Call.CustomerId));
            sp.Add(pararm);
            pararm = new SqlParameter("@SubCategoryId", ToDBNull(Call.DeviceSubCategoryId));
            sp.Add(pararm);
            pararm = new SqlParameter("@ModelNumber", ToDBNull(Call.DeviceModelNo));
            sp.Add(pararm);
            pararm = new SqlParameter("@Remarks", ToDBNull(Call.Remarks));
            sp.Add(pararm);
            pararm = new SqlParameter("@StatusId", ToDBNull(Call.AppointmentStatus));
            sp.Add(pararm);
            pararm = new SqlParameter("@AppointmentDateTime", ToDBNull(Call.AppointmentDate));
            sp.Add(pararm);
            pararm = new SqlParameter("@ProblemDescription", ToDBNull(Call.ProblemDescription));
            sp.Add(pararm);
            //pararm = new SqlParameter("@IssueOcurringSinceDate", ToDBNull(DateTime.ParseExact(Call.IssueOcurringSinceDate, "dd/MM/yyyy", CultureInfo.InvariantCulture)));
            pararm = new SqlParameter("@IssueOcurringSinceDate", ToDBNull((Call.IssueOcurringSinceDate != null) ? DateTime.ParseExact(Call.IssueOcurringSinceDate, "dd/MM/yyyy", CultureInfo.InvariantCulture) : Call.AppointmentDate));
            sp.Add(pararm);
            pararm = new SqlParameter("@PreviousCallId", ToDBNull(Call.PreviousCallId));
            sp.Add(pararm);
            pararm = new SqlParameter("@DataSourceId", ToDBNull(Call.DataSourceId));
            sp.Add(pararm);
            var sql = "AddEditCallLog " +
                      "@ID,@CLIENTID,@isExistingCustomer,@CustMobileNubmer,@CustType,@CustName,@CustAltCont,@CustEmail,@AddressTypeId,@Address," +
                      "@Landmark,@PinCode,@LocationId,@City,@DEVICECATEGORYID,@DEVICEBRANDID,@DEVICEMODELID,@SLN,@IMEI1,@IMEI2,@DEVICEPURCHASEFROM,@DOP," +
                      "@BILLNUBMER,@BILLAMOUNT,@DEVICECONDITIONID,@SERVICETYPEID,@DELIVERYTYPEID,@ACTION,@USERID,@CompanyId,@DEVICEID,@CUSTOMERID,@SubCategoryId,@ModelNumber,@Remarks," +
                      "@StatusId,@AppointmentDateTime,@ProblemDescription,@IssueOcurringSinceDate,@PreviousCallId,@DataSourceId";


            var res = await _context.Database.SqlQuery <ResponseModel>(sql, sp.ToArray()).SingleOrDefaultAsync();

            if (res.ResponseCode == 0)
            {
                res.IsSuccess = true;
            }
            return(res);
        }
        public async Task <ActionResult> Edit(CallDetailsModel CallDetailsModel)
        {
            if (!ModelState.IsValid)
            {
                //IEnumerable<ModelError> allErrors = ModelState.Values.SelectMany(v => v.Errors);

                bool IsClient = false;
                var  filter   = new FilterModel {
                    CompId = CurrentUser.CompanyId
                };
                if (CurrentUser.UserTypeName.ToLower().Contains("client"))
                {
                    filter.ClientId = CurrentUser.RefKey;
                    filter.RefKey   = CurrentUser.RefKey;
                    IsClient        = true;
                }

                var serviceType = await CommonModel.GetServiceType(filter);

                var deliveryType = await CommonModel.GetDeliveryServiceType(filter);

                CallDetailsModel.ClientList       = new SelectList(await CommonModel.GetClientData(CurrentUser.CompanyId), "Name", "Text");
                CallDetailsModel.ServiceTypeList  = new SelectList(serviceType, "Value", "Text");
                CallDetailsModel.DeliveryTypeList = new SelectList(deliveryType, "Value", "Text");
                // new call Log
                CallDetailsModel.BrandList    = new SelectList(_dropdown.BindBrand(CurrentUser.CompanyId), "Value", "Text");
                CallDetailsModel.CategoryList = new SelectList(_dropdown.BindCategory(new FilterModel {
                    CompId = CurrentUser.CompanyId, ClientId = CallDetailsModel.ClientId
                }), "Value", "Text");
                CallDetailsModel.SubCategoryList = new SelectList(_dropdown.BindSubCategory(new FilterModel {
                    CategoryId = CallDetailsModel.DeviceCategoryId, ClientId = CallDetailsModel.ClientId
                }), "Value", "Text");
                CallDetailsModel.ProductList      = new SelectList(_dropdown.BindProduct(CallDetailsModel.DeviceBrandId.ToString() + "," + CallDetailsModel.DeviceSubCategoryId.ToString()), "Value", "Text");
                CallDetailsModel.CustomerTypeList = new SelectList(await CommonModel.GetLookup("Customer Type"), "Value", "Text");
                CallDetailsModel.ConditionList    = new SelectList(await CommonModel.GetLookup("Device Condition"), "Value", "Text");
                CallDetailsModel.IsClient         = IsClient;
                if (CallDetailsModel.ClientId != null)
                {
                    CallDetailsModel.StatusList = new SelectList(await CommonModel.GetStatusTypes("Client"), "Value", "Text");
                }
                else
                {
                    CallDetailsModel.StatusList = new SelectList(await CommonModel.GetStatusTypes("Customer support"), "Value", "Text");
                }
                CallDetailsModel.ServiceTypeList  = new SelectList(serviceType, "Value", "Text");
                CallDetailsModel.DeliveryTypeList = new SelectList(deliveryType, "Value", "Text");
                // address=new AddressDetail
                //{
                CallDetailsModel.AddressTypelist = new SelectList(await CommonModel.GetLookup("ADDRESS"), "Value", "Text");
                CallDetailsModel.LocationList    = new SelectList(_dropdown.BindLocationByPinCode(CallDetailsModel.PinNumber), "Value", "Text");

                // }
                return(View("edit", CallDetailsModel));
            }

            else
            {
                CallDetailsModel.UserId      = CurrentUser.UserId;
                CallDetailsModel.CompanyId   = CurrentUser.CompanyId;
                CallDetailsModel.EventAction = 'U';
                if (CallDetailsModel.ClientId == null)
                {
                    CallDetailsModel.CRemark = CallDetailsModel.Remarks;
                }
                var response = await _RepoCallLog.AddOrEditCallLog(CallDetailsModel);

                TempData["response"] = response;
                if (!string.IsNullOrEmpty(CallDetailsModel.Type))
                {
                    return(RedirectToAction("Index", "PendingCalls"));
                }
                else
                {
                    return(RedirectToAction("Index"));
                }
            }
        }
        public async Task <ActionResult> NewCallLog(CallDetailsModel uploads)
        {
            if (ModelState.IsValid)
            {
                uploads.UserId    = CurrentUser.UserId;
                uploads.CompanyId = CurrentUser.CompanyId;
                if (CurrentUser.UserTypeName.ToLower().Contains("client"))
                {
                    uploads.ClientId = CurrentUser.RefKey;
                }
                uploads.EventAction = 'I';
                var response = await _RepoCallLog.AddOrEditCallLog(uploads);

                if (response.IsSuccess)
                {
                    var Templates = await _templateRepo.GetTemplateByActionId((int)EmailActions.CALL_REGISTRATION, CurrentUser.CompanyId);

                    CurrentUser.Email = uploads.CustomerEmail;
                    var WildCards = CommonModel.GetWildCards(CurrentUser.CompanyId);
                    var U         = WildCards.Where(x => x.Text.ToUpper() == "NAME").FirstOrDefault();
                    U.Val = uploads.CustomerName;
                    U     = WildCards.Where(x => x.Text.ToUpper() == "CALL ID").FirstOrDefault();
                    U.Val = response.result;
                    U     = WildCards.Where(x => x.Text.ToUpper() == "CUSTOMER SUPPORT NUMBER").FirstOrDefault();
                    U.Val = CurrentUser.CustomerCareNumber;
                    U     = WildCards.Where(x => x.Text.ToUpper() == "CUSTOMER SUPPORT EMAIL").FirstOrDefault();
                    U.Val = CurrentUser.ContactCareEmail;
                    CurrentUser.Mobile = uploads.CustomerContactNumber;
                    var c = WildCards.Where(x => x.Val != string.Empty).ToList();
                    if (Templates.Count > 0)
                    {
                        await _emailSmsServices.Send(Templates, c, CurrentUser);
                    }
                }
                TempData["response"] = response;
                return(RedirectToAction("Index"));
            }
            else
            {
                bool IsClient = false;
                var  filter   = new FilterModel {
                    CompId = CurrentUser.CompanyId
                };
                if (CurrentUser.UserTypeName.ToLower().Contains("client"))
                {
                    filter.ClientId = CurrentUser.RefKey;
                    filter.RefKey   = CurrentUser.RefKey;
                    IsClient        = true;
                }
                var clientData  = new MainClientDataModel();
                var serviceType = await CommonModel.GetServiceType(filter);

                var deliveryType = await CommonModel.GetDeliveryServiceType(filter);

                clientData.Client                  = new FileDetailModel();
                clientData.Client.IsClient         = IsClient;
                clientData.Client.ClientId         = filter.ClientId;
                clientData.Client.ClientList       = new SelectList(await CommonModel.GetClientData(CurrentUser.CompanyId), "Name", "Text");
                clientData.Client.ServiceTypeList  = new SelectList(serviceType, "Value", "Text");
                clientData.Client.DeliveryTypeList = new SelectList(deliveryType, "Value", "Text");
                // new call Log
                clientData.NewCallLog              = uploads;
                clientData.NewCallLog.BrandList    = new SelectList(_dropdown.BindBrand(CurrentUser.CompanyId), "Value", "Text");
                clientData.NewCallLog.CategoryList = new SelectList(_dropdown.BindCategory(new FilterModel {
                    CompId = CurrentUser.CompanyId, ClientId = uploads.ClientId
                }), "Value", "Text");
                clientData.NewCallLog.SubCategoryList = new SelectList(_dropdown.BindSubCategory(new FilterModel {
                    CategoryId = uploads.DeviceCategoryId, ClientId = uploads.ClientId
                }), "Value", "Text");
                clientData.NewCallLog.ProductList      = new SelectList(_dropdown.BindProduct(uploads.DeviceBrandId.ToString() + "," + uploads.DeviceSubCategoryId.ToString()), "Value", "Text");
                clientData.NewCallLog.CustomerTypeList = new SelectList(await CommonModel.GetLookup("Customer Type"), "Value", "Text");
                clientData.NewCallLog.ConditionList    = new SelectList(await CommonModel.GetLookup("Device Condition"), "Value", "Text");
                clientData.NewCallLog.IsClient         = IsClient;
                clientData.NewCallLog.StatusList       = new SelectList(await CommonModel.GetStatusTypes("Client"), "Value", "Text");
                clientData.NewCallLog.ServiceTypeList  = new SelectList(serviceType, "Value", "Text");
                clientData.NewCallLog.DeliveryTypeList = new SelectList(deliveryType, "Value", "Text");
                // address=new AddressDetail
                //{
                clientData.NewCallLog.AddressTypelist = new SelectList(await CommonModel.GetLookup("ADDRESS"), "Value", "Text");
                clientData.NewCallLog.LocationList    = new SelectList(_dropdown.BindLocationByPinCode(clientData.NewCallLog.PinNumber), "Value", "Text");
                clientData.tab_index = "tab-7";
                // }
                return(View("Index", clientData));
            };
        }