/// <summary> /// Deprecated Method for adding a new object to the POLMAS EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToPOLMAS(POLMA pOLMA) { base.AddObject("POLMAS", pOLMA); }
/// <summary> /// Create a new POLMA object. /// </summary> /// <param name="cLIENT_ID">Initial value of the CLIENT_ID property.</param> /// <param name="pOLICY_ID">Initial value of the POLICY_ID property.</param> /// <param name="rowguid">Initial value of the rowguid property.</param> public static POLMA CreatePOLMA(global::System.Int32 cLIENT_ID, global::System.Int32 pOLICY_ID, global::System.Guid rowguid) { POLMA pOLMA = new POLMA(); pOLMA.CLIENT_ID = cLIENT_ID; pOLMA.POLICY_ID = pOLICY_ID; pOLMA.rowguid = rowguid; return pOLMA; }
public void doPolicies(Form1 form, System.IO.DirectoryInfo migrationDir, string lob) { var files = migrationDir.GetFiles(); foreach (var file in files) { form.updFileLabel(file.Name); try { using (var t = new StreamReader(file.FullName)) { var bits = t.ReadToEnd(); dynamic json = JsonHelper.Decode(bits); int clientID = client.getID(json.NamedInsured.Id + ".json"); if (clientID > 0) { POLMA item = new POLMA() { CLIENT_ID = clientID, POLICY_NUM = json.PolicyNumber, LOB = lob, UserName = "******", CSTATUS = "A", MPAY_1=0, MPAY_2=0, MPAY_3=0, MPAY_4=0, MPAY_5=0, MPAY_6=0, MPAY_7=0, MPAY_8=0, MPAY_9=0, MPAY_10=0, MPAY_11=0, MPAY_12=0, CPAY_1=0, CPAY_2=0, CPAY_3=0, CPAY_4=0, CPAY_5=0, CPAY_6=0, CPAY_7=0, CPAY_8=0, CPAY_9=0, CPAY_10=0, CPAY_11=0, CPAY_12=0, Endorsement_policy_id = 0 }; try { item.EFFECTIVE = Convert.ToDateTime(json.EffectiveDate.Substring(0, 10)); if (item.EFFECTIVE < Convert.ToDateTime("1800-01-01")) item.EFFECTIVE = null; item.EXPIRATION = Convert.ToDateTime(json.RenewDate.Substring(0, 10)); if (item.EXPIRATION < Convert.ToDateTime("1800-01-01")) item.EXPIRATION = null; } catch { } try { item.CSR = json.Producer; item.BINDER_NUM = json.BinderNumber; item.COMPANY = json.CompanyName; item.PISSUED = Convert.ToDecimal(json.CurrentTermAmount); item.PQUOTED = item.PISSUED; item.PERIOD = Convert.ToString(json.ContractTerm); item.PSTATUS = (json.Status == "Expired") ? "X" : "A"; item.CEARNED = Convert.ToDecimal(json.CommissionAmount); } catch { } db.POLMAS.AddObject(item); db.SaveChanges(); if (item.POLICY_ID % 100 == 0) form.Refresh(); } } } catch { } } }