public ActionResult JobAtachmentList(int id) { var list = (from li in db.job_attachment.AsEnumerable() where li.job_id == id && li.is_active select new { job_attachment_id = li.job_attachment_id, job_attachment = AWSUtil.GetFileURL(li.job_attachment1), user_name = li.user.user_name, jobAttachmentName = li.description, is_active = li.is_active, }).ToList(); return(Json(list)); }
public ActionResult CompanyList() { var path = RoleUtil.IsInRole(Role.SuperAdmin)?STUtil.GetWebConfigValue("SystemImagePath"):SessionUtil.GetCompanyFolderName().ToString(); //var list = db.companies.Where(x => x.parent_company_id != null).AsEnumerable().ToList(); var list = db.companies.AsEnumerable().ToList(); var data = (from li in list select new { company_id = li.company_id, business_name = li.business_name, admin_user_name = li.admin_user_name, address = li.state != null ? li.address + ", " + li.city + ", " + li.zip + ", " + li.state.state_name + ", " + li.state.country.country_name : "", image = AWSUtil.GetFileURL(li.company_logo, li.company_folder_name), is_active = li.is_active, }).ToList(); return(Json(data)); }
public ActionResult ClientEdit(string id) { var userList = db.users.AsEnumerable().Where(u => u.user_id == Convert.ToInt32(id)).ToList(); int company_id = userList.FirstOrDefault().company_id; company company = new company(); company = company_id > 0 ? db.companies.Find(company_id) : company; string SNAG_AWS_S3 = STUtil.GetWebConfigValue("ImagePath"); String companyFolderName = company.company_folder_name != null?company.company_folder_name.ToString() : ""; var UserPhoto = userList.FirstOrDefault().user_photo != null ? SNAG_AWS_S3 + companyFolderName + userList.FirstOrDefault().user_photo : SNAG_AWS_S3 + userList.FirstOrDefault().user_photo; var data = (from u in userList select new { user_id = u.user_id, user_name = u.user_name, login_id = u.login_id, email_id = u.email_id, mobile = u.mobile, gender = u.gender, payment_term_idList = new UserUtil().GetPaymentTermList(), payment_term_id = u.payment_term_id, parent_id = u.role_bit, role_bit = u.role_bit, is_active = u.is_active, UserPhoto = UserPhoto, user_photo = u.user_photo, user_photoSRC = AWSUtil.GetFileURL(u.user_photo), hdnUserPhoto = u.user_photo, role_id = u.role_id, gstin_numer = u.gstin_numer, billing_address = u.billing_address, shipping_address = u.shipping_address, payment_terms = u.payment_terms, }).FirstOrDefault(); return(Json(data)); }