public IHttpActionResult InsertForm2Details(FormTwoRegistration request) { try { string host = Dns.GetHostName(); string ip = Dns.GetHostAddresses(host)[0].ToString(); FbisLogger.Log("Method Entry", ip, System.Reflection.MethodBase.GetCurrentMethod().ToString(), this.Request.RequestUri.AbsoluteUri); LicenseRegistration licenceReg = new LicenseRegistration(); if (licenceReg.InsertForm2Details(request)) { JsonResponse json = new JsonResponse(); json.Status = "200 OK"; json.StatusMsg = "Record Inserted Successfully"; string jo = JsonConvert.SerializeObject(json).ToString(); JObject job = JObject.Parse(jo); return(Ok(job)); } else { return(BadRequest()); } } catch (Exception ex) { Log log = new Log(); log.LogFile("Exception:" + ex.Message.ToString(), appRunningId); return(BadRequest()); } }
public bool InsertForm2Details(FormTwoRegistration formReg) { FolderCreate fc = new FolderCreate(); FormTwoEntity form = formReg.form; bool flag = false; try { List <Files> file = formReg.File; flag = Convert.ToBoolean(operation.DML("insert_Form2", form.License_Years, form.From_Year, form.To_Year, form.Factory_Name, form.Fac_Add_Line1, form.Fac_Add_Line2, form.Fac_Pincode, form.Fac_Phone_No, form.Fac_Post, form.Fac_Taluk, form.Fac_District, form.Fac_Mobile_No, form.Fac_Email_Id, form.Com_Add_Line1, form.Com_Add_Line2, form.Com_Pincode, form.Com_Phone_No, form.Com_Post, form.Com_Taluk, form.Com_District, form.Com_Mobile_No, form.Nature_Of_Manufacture_Next, form.Nature_Of_Manufacture_Prev, form.Product_To_Be_Manufactured, form.Proposed_Men_Cnt, form.Proposed_Women_Cnt, form.Proposed_Total_Cnt, form.Employed_Men_Cnt, form.Employed_Women_Cnt, form.Employed_Total_Cnt, form.Total_Worker_Employed_Men, form.Total_Worker_Employed_Women, form.Total_Worker_Employed, form.Power_Installed, form.Proposed_Power, form.Kw_Elec_Fac, form.Manager_Name, form.Mgr_Add_Line1, form.Mgr_Add_Line2, form.Mgr_Pincode, form.Mgr_Phone_No, form.Mgr_Post, form.Mgr_Taluk, form.Mgr_District, form.Mgr_Mobile_No, form.Occupier_Name, form.Occupier_Add_Line1, form.Occupier_Add_Line2, form.Occupier_Pincode, form.Occupier_Phone_No, form.Occupier_Post, form.Occupier_Taluk, form.Occupier_District, form.Occupier_Mobile_No, form.Occupier_Email_Id, form.Fac_Premises_Owner_Name, form.Fac_Premises_Owner_Add_Line1, form.Fac_Premises_Owner_Add_Line2, form.Fac_Premises_Owner_Pincode, form.Fac_Premises_Owner_Phone_No, form.Fac_Premises_Owner_Post, form.Fac_Premises_Owner_Taluk, form.Fac_Premises_Owner_District, form.Fac_Premises_Owner_Mobile_No, form.Ref_No_Date_Of_Approval, form.Ref_No_DAate_Of_Trade_Waste, form.Amount_Paid, form.Paid_In_To, form.Fee_Paid_Date, form.Challen_No, form.Userid, form.Circle_Cd, form.Division_Cd, form.Amount_In_Words, form.CompanyType, form.NIC_Code, form.NIC_Description, form.ASICC_Description, form.Occupier_FatherName, form.Occupier_Age, form.Manager_FatherName, form.Manager_Age)); if (flag) { string str = getFacIdFromForm2Details(form); if (str != null) { flag = Convert.ToBoolean(fc.CreateDirectory(str, file)); } else { flag = false; } } } catch (Exception e) { Log log = new Log(); log.LogFile("Exception:" + e.Message.ToString(), appRunningId); } return(flag); }