public int BackLogForwardToARCS(ForwardToARCSOfficers objFTAO) { int i; using (SqlConnection con = new SqlConnection(ConStr)) { con.Open(); SqlCommand com = new SqlCommand("[dbo].[Blog_ForwardToARCSOfficer]", con) { CommandType = CommandType.StoredProcedure }; com.Parameters.AddWithValue("@Remarks", objFTAO.Remarks); com.Parameters.AddWithValue("@SocietyTransId", objFTAO.SocietyTransId); i = com.ExecuteNonQuery(); } return(i); }
public ActionResult SocietyMemberDetails(FormCollection fc, IEnumerable <HttpPostedFileBase> files) { ByeLawsModel objBL = new ByeLawsModel(); ContentFileUploadModel objCFU = new ContentFileUploadModel(); try { int i = 4; foreach (var file in files) { if (file != null) { AttachmentType aa = new AttachmentType(); Stream str = file.InputStream; objCFU.File_Name = file.FileName; objBL.ByeLawsName = file.FileName; string extenstion = "pdf"; BinaryReader Br = new BinaryReader(str); byte[] FileDet = Br.ReadBytes((Int32)str.Length); string base64ImageRepresentation = Convert.ToBase64String(FileDet); objBL.Docs = base64ImageRepresentation; objCFU.ContentUpload = base64ImageRepresentation; objBL.SocietyTransID = Convert.ToString(Session["SocietyTransID"]); objCFU.USER_ID = Convert.ToInt32(Session["UserId"]); objCFU.SocietyTransID = Convert.ToString(Session["SocietyTransID"]); aa = GetMimeType(base64ImageRepresentation); objCFU.FormId = i; if (extenstion.IndexOf(aa.Extension.Replace(".", "")) < 0 || aa.Extension == "") { } else { Int64 filesizeallowedfor_FileUpload = 2048 * 5; if (file.ContentLength < filesizeallowedfor_FileUpload) { int a = objSSF.SaveContentFileUpload(objCFU); } } } i = i + 1; } List <SelectListItem> lstSL = new List <SelectListItem>(); List <SelectListItem> lstI = new List <SelectListItem>(); InspectorData objID = new InspectorData(); ForwardToARCSOfficers objFTAO = new ForwardToARCSOfficers { IncepectorCode = Convert.ToInt32(Session["InsceptorCode"]), SocietyTransId = Convert.ToString(Session["SocietyTransID"]), Remarks = fc.Get("ARCSRemarks").ToString() }; int result = objID.ForwardToARCS(objFTAO); if (result >= 1) { ViewBag.show = "Application successfully forwarded to incepector"; ViewBag.result = "1"; ViewBag.tabResult = "1"; } else { ViewBag.show = "Application not successfully forwarded to incepector"; ViewBag.result = "0"; ViewBag.tabResult = "0"; } lstSL = GetSocietyList(); ViewBag.lstSL = lstSL; } catch (Exception ex) { return(RedirectToAction("Error", "Unauthorised")); throw ex; } return(View()); }
public ActionResult BackLogMemberDetail(FormCollection fc) { try { int result = 0; List <SelectListItem> lstSL = new List <SelectListItem>(); List <SelectListItem> lstI = new List <SelectListItem>(); ARCSData objARCSD = new ARCSData(); InspectorData objID = new InspectorData(); ForwardToIncepector objFTI = new ForwardToIncepector(); if (Convert.ToInt32(Session["RoleId"]) == 3) { string IPAddress = GetIPAddress(); string Browser = GetWebBrowserName(); ForwardToARCSOfficers objFTAO = new ForwardToARCSOfficers { IncepectorCode = Convert.ToInt32(Session["InsceptorCode"]), SocietyTransId = Convert.ToString(Session["SocietyTransID"]), Remarks = fc.Get("ARCSRemarks").ToString() }; if (Convert.ToInt16(Session["InspectorCount"]) >= 1) { Boolean IsCheck = Convert.ToBoolean(fc.Get("Insprctorchk1")); SaveDeclaration savedeclaration = new SaveDeclaration { UserId = Convert.ToInt32(Session["UserId"]), IPAddress = IPAddress, BrowserName = Browser, Ischeck = IsCheck, Remark = objFTAO.Remarks, SocietyTransID = objFTAO.SocietyTransId, }; objARCSD.SaveDeclaration(savedeclaration); } result = objID.BackLogForwardToARCS(objFTAO); if (result >= 1) { if (Convert.ToInt32(Session["InspectorCount"]) > 1) { ViewBag.InspectorChange = "Yes"; } ViewBag.show = "BackLog Application successfully forwarded to ARCS Officer"; ViewBag.result = "1"; ViewBag.tabResult = "1"; } else { ViewBag.show = "BackLog Application not successfully forwarded to ARCS Officer"; ViewBag.result = "0"; ViewBag.tabResult = "0"; } lstSL = GetSocietyList(); ViewBag.lstSL = lstSL; } if (Convert.ToInt32(Session["RoleId"]) == 2) { if (string.IsNullOrEmpty(fc.Get("IncepectorList"))) { ViewBag.show = "Kindly Select Inspector"; ViewBag.result = "0"; ViewBag.tabResult = "5"; return(View()); } if (string.IsNullOrEmpty(fc.Get("ARCSRemarks"))) { ViewBag.show = "fill your remarks"; ViewBag.result = "0"; ViewBag.tabResult = "5"; return(View()); } objFTI.OfficerCode = Convert.ToInt32(fc.Get("IncepectorList")); var SocietyTransID = Convert.ToString(Session["SocietyTransID"]); Session["SocietyTransID"] = SocietyTransID; objFTI.SocietyTransId = Convert.ToString(Session["SocietyTransID"]); objFTI.Remarks = fc.Get("ARCSRemarks").ToString(); result = objARCSD.BackLogForwardToIncepector(objFTI); if (result >= 1) { ViewBag.show = "Application successfully forwarded to incepector"; ViewBag.result = "1"; ViewBag.tabResult = "1"; } else { ViewBag.show = "Application not successfully forwarded to incepector"; ViewBag.result = "0"; ViewBag.tabResult = "0"; } lstSL = GetSocietyList(); ViewBag.lstSL = lstSL; lstI = GetInspectorSocietyList(); ViewBag.BcklstI = lstI; } lstGD = GetDistrict(); ViewBag.District = lstGD; lstR = GetRelationship(); ViewBag.Relationship = lstR; lstMember = GetAllShareTransferMember(); ViewBag.MemberDetail = lstMember; lstMCDCM = GetMemberCommDesignation(); ViewBag.MemberCommDesignation = lstMCDCM; lstARCSCode = GetsubClassSocieties(); ViewBag.lstARCSCode = lstARCSCode; CommunityofSociety = GetCommunityofSociety(); ViewBag.CommunityofSociety = CommunityofSociety; lstSL = GetSocietyList(); ViewBag.lstSL = lstSL; Inspkl = GetInspectorSocietyList(); ViewBag.Inspkl = Inspkl; lstI = GetInspectorList(); ViewBag.lstI = lstI; } catch (Exception ex) { return(RedirectToAction("Error", "Unauthorised")); throw ex; } return(View()); }