/// <summary> /// Create a new UpcmomingSurveyor object. /// </summary> /// <param name="surApp_Id">Initial value of the SurApp_Id property.</param> public static UpcmomingSurveyor CreateUpcmomingSurveyor(global::System.Int32 surApp_Id) { UpcmomingSurveyor upcmomingSurveyor = new UpcmomingSurveyor(); upcmomingSurveyor.SurApp_Id = surApp_Id; return upcmomingSurveyor; }
public void UpdateRecord(string FirstName, string Lastname, int applyAsrole, string password, string emailId) { // int result = 0; using (ROPAEntities context = new ROPAEntities()) { UpcmomingSurveyor obj = new UpcmomingSurveyor(); obj.FirstName = FirstName; obj.LastName = Lastname; obj.ApplyAsRole = applyAsrole; obj.Password = password; obj.EMAILID = emailId; obj.ModifedDate = DateTime.Now; obj.AppId = 2; // context.AddToUpcmomingSurveyors(obj); // result= context.SaveChanges(); // return result; } }
/// <summary> /// Deprecated Method for adding a new object to the UpcmomingSurveyors EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToUpcmomingSurveyors(UpcmomingSurveyor upcmomingSurveyor) { base.AddObject("UpcmomingSurveyors", upcmomingSurveyor); }
public int InsertRecord(string FirstName, string Lastname, int applyAsrole, string password, string emailId, List<UploadFile> L) { int result = 0; using (ROPAEntities context = new ROPAEntities()) { UpcmomingSurveyor obj = new UpcmomingSurveyor(); obj.FirstName = FirstName; obj.LastName = Lastname; obj.ApplyAsRole = applyAsrole; obj.Password = password; obj.AppId = 1; obj.ModifedDate = DateTime.Now; obj.EMAILID = emailId; context.AddToUpcmomingSurveyors(obj); foreach (UploadFile G in L) { UploadFiles Upld = new UploadFiles(); string s = G.GUID; var Q = (from u in context.UploadFiles where u.GUID ==s select u).FirstOrDefault(); Q.SurApp_Id = obj.SurApp_Id; } context.SaveChanges(); return result; } }