public ActionResult CommentDetails(string id, string uid, string date, CommentDetail commentDetail, string Command) { if (id != null) { ViewBag.record = othersService.CommentRecordService(long.Parse(id)); ViewBag.comment = othersService.CommentDetail(long.Parse(id)); //return View(); } if (Command == "Submit") { //var user = (CustomPrincipal)System.Web.HttpContext.Current.User; commentDetail.CommentId = long.Parse(id); commentDetail.UserLoginId = ValidUserUtility.ValidUser(); //(int)user.UserId; commentDetail.CommentDate = Convert.ToDateTime(date); commentDetail.UpdatedBy = ValidUserUtility.ValidUser(); //user.UserId; othersService.AddComment(commentDetail); if (commentDetail.CommentDetId != 0) { return(Content("<script language='javascript' type='text/javascript'>alert('Replied Successfully');location.href='" + @Url.Action("comments", "others") + "'</script>")); } else { return(Content("<script language='javascript' type='text/javascript'>alert('Failed');location.href='" + @Url.Action("comments", "others") + "'</script>")); } } return(View()); }
public ActionResult TicketDetails(string id, string Command, IssueDetail issueDetail) { string updateddate = DateTime.UtcNow.ToShortDateString(); if (id != null) { ViewBag.record = othersService.TicketRecordService(long.Parse(id)); ViewBag.ticket = othersService.TicketDetail(long.Parse(id)); } if (Command == "Submit") { issueDetail.TicketId = long.Parse(id); issueDetail.RepliedBy = ValidUserUtility.ValidUser(); issueDetail.ReplayedDate = Convert.ToDateTime(updateddate); issueDetail.UpdatedBy = ValidUserUtility.ValidUser(); issueDetail = othersService.AddTicket(issueDetail); if (issueDetail.TicketCommuId != 0) { return(Content("<script language='javascript' type='text/javascript'>alert('Replied Successfully');location.href='" + @Url.Action("tickets", "others") + "'</script>")); } else { return(Content("<script language='javascript' type='text/javascript'>alert('Failed');location.href='" + @Url.Action("tickets", "others") + "'</script>")); } } return(View()); }
public VendorVenue AddVenue(VendorVenue vendorVenue, Vendormaster vendorMaster) { DateTime updateddate = TimeZoneInfo.ConvertTimeFromUtc(DateTime.UtcNow, INDIAN_ZONE); vendorVenue.Status = "Active"; vendorVenue.UpdatedDate = updateddate; vendorMaster.Status = "Active"; vendorMaster.UpdatedDate = updateddate; vendorMaster.ServicType = "Venue"; vendorMaster = vendorMasterRepository.AddVendorMaster(vendorMaster); vendorVenue.VendorMasterId = vendorMaster.Id; if (vendorVenue.Food == "Veg") { vendorVenue.NonVegLunchCost = 0; vendorVenue.NonVegDinnerCost = 0; } else if (vendorVenue.Food == "Non-Veg") { vendorVenue.VegLunchCost = 0; vendorVenue.VegDinnerCost = 0; } vendorVenue = vendorVenueRepository.AddVenue(vendorVenue); userLogin.UserName = vendorMaster.EmailId; userLogin.Password = randomPassword.GenerateString(); userLogin.UserType = "Vendor"; userLogin.UpdatedBy = 2; userLogin.Status = "Active"; userLogin.RegDate = updateddate; userLogin.UpdatedDate = updateddate; userLogin = userLoginRepository.AddVendorUserLogin(userLogin); userDetail.UserLoginId = userLogin.UserLoginId; userDetail.FirstName = vendorMaster.BusinessName; userDetail.UserPhone = vendorMaster.ContactNumber; userDetail.Url = vendorMaster.Url; userDetail.Address = vendorMaster.Address; userDetail.City = vendorMaster.City; userDetail.State = vendorMaster.State; userDetail.ZipCode = vendorMaster.ZipCode; userDetail.Status = "Active"; userDetail.UpdatedBy = ValidUserUtility.ValidUser(); userDetail.UpdatedDate = updateddate; userDetail.AlternativeEmailID = vendorMaster.EmailId; userDetail.Landmark = vendorMaster.Landmark; userDetail = userDetailsRepository.AddUserDetails(userDetail); if (vendorMaster.Id != 0 && vendorVenue.Id != 0 && userLogin.UserLoginId != 0 && userDetail.UserDetailId != 0) { return(vendorVenue); } else { vendorVenue.Id = 0; return(vendorVenue); } }
public VendorsEntertainment AddEntertainment(VendorsEntertainment vendorEntertainment, Vendormaster vendorMaster) { string updateddate = DateTime.UtcNow.ToShortDateString(); vendorEntertainment.Status = "Active"; vendorEntertainment.UpdatedDate = Convert.ToDateTime(updateddate); vendorMaster.Status = "Active"; vendorMaster.UpdatedDate = Convert.ToDateTime(updateddate); vendorMaster.ServicType = "Entertainment"; vendorMaster = vendorMasterRepository.AddVendorMaster(vendorMaster); vendorEntertainment.VendorMasterId = vendorMaster.Id; vendorEntertainment = vendorEntertainmentRespository.AddEntertainment(vendorEntertainment); userLogin.UserName = vendorMaster.EmailId; userLogin.Password = randomPassword.GenerateString(); userLogin.UserType = "Vendor"; userLogin.UpdatedBy = 2; userLogin.RegDate = Convert.ToDateTime(updateddate); userLogin.UpdatedDate = Convert.ToDateTime(updateddate); userLogin.Status = "Active"; userLogin = userLoginRepository.AddVendorUserLogin(userLogin); userDetail.UserLoginId = userLogin.UserLoginId; userDetail.FirstName = vendorMaster.BusinessName; userDetail.UserPhone = vendorMaster.ContactNumber; userDetail.Url = vendorMaster.Url; userDetail.Address = vendorMaster.Address; userDetail.City = vendorMaster.City; userDetail.State = vendorMaster.State; userDetail.ZipCode = vendorMaster.ZipCode; userDetail.Status = "Active"; userDetail.UpdatedBy = ValidUserUtility.ValidUser(); userDetail.UpdatedDate = Convert.ToDateTime(updateddate); userDetail.AlternativeEmailID = vendorMaster.EmailId; userDetail.Landmark = vendorMaster.Landmark; userDetail = userDetailsRepository.AddUserDetails(userDetail); if (vendorMaster.Id != 0 && vendorEntertainment.Id != 0 && userLogin.UserLoginId != 0 && userDetail.UserDetailId != 0) { return(vendorEntertainment); } else { vendorEntertainment.Id = 0; return(vendorEntertainment); } }
public VendorsDecorator AddDecorator(VendorsDecorator vendorsdecorator, Vendormaster vendorMaster) { DateTime updateddate = TimeZoneInfo.ConvertTimeFromUtc(DateTime.UtcNow, INDIAN_ZONE); vendorMaster.ServicType = "Decorators"; vendorMaster.Status = "Active"; vendorMaster.UpdatedDate = updateddate; vendorsdecorator.Status = "Active"; vendorsdecorator.UpdatedDate = updateddate; vendorMaster = vendorMasterRepository.AddVendorMaster(vendorMaster); vendorsdecorator.VendorMasterId = vendorMaster.Id; vendorsdecorator = vendorsDecoratorRepository.AddDecorator(vendorsdecorator); userLogin.UserName = vendorMaster.EmailId; userLogin.Password = randomPassword.GenerateString(); userLogin.UserType = "Vendor"; userLogin.UpdatedBy = 2; userLogin.RegDate = Convert.ToDateTime(updateddate); userLogin.UpdatedDate = Convert.ToDateTime(updateddate); userLogin.Status = "Active"; userLogin = userLoginRepository.AddVendorUserLogin(userLogin); userDetail.UserLoginId = userLogin.UserLoginId; userDetail.FirstName = vendorMaster.BusinessName; userDetail.UserPhone = vendorMaster.ContactNumber; userDetail.Url = vendorMaster.Url; userDetail.Address = vendorMaster.Address; userDetail.City = vendorMaster.City; userDetail.State = vendorMaster.State; userDetail.ZipCode = vendorMaster.ZipCode; userDetail.Status = "Active"; userDetail.UpdatedBy = ValidUserUtility.ValidUser(); userDetail.UpdatedDate = updateddate; userDetail.AlternativeEmailID = vendorMaster.EmailId; userDetail.Landmark = vendorMaster.Landmark; userDetail = userDetailsRepository.AddUserDetails(userDetail); if (vendorMaster.Id != 0 && vendorsdecorator.Id != 0 && userLogin.UserLoginId != 0 && userDetail.UserDetailId != 0) { return(vendorsdecorator); } else { vendorsdecorator.Id = 0; return(vendorsdecorator); } }