public atLogic.ObjectBE GetOffice2JD() { if (myOffice2JDBE == null) { if (myatMng.AppMan.UseService) { myOffice2JDBE = this.GetObjectBE(null, DB.Office2JD); } else { myOffice2JDBE = this.GetObjectBE(DALMngr.GetOffice2JD(), DB.Office2JD); } } return(myOffice2JDBE); }
//public string IfEmptyReturnNull(string qry) //{ // if (qry == "" || qry == null) // return null; // else // { // string[] str = qry.Split(new char[] { ' ' }, 2); // if (str.Length > 1) // { // if (str[1] == "ascending") // return str[0] + " " + "ASC"; // else if (str[1] == "descending") // return str[0] + " " + "DESC"; // else // return qry; // } // else // return qry; // } //} protected ObjectBE GetObjectBE(atDAL.ObjectDAL oDAL, DataTable dt) { if (dt.ExtendedProperties.ContainsKey("BE")) { return((ObjectBE)dt.ExtendedProperties["BE"]); } else { ObjectBE o = new ObjectBE(this, dt); if (oDAL != null) { o.myODAL = oDAL; } return(o); } }
public atLogic.ObjectBE GetBEFromTable(DataTable dt) { atLogic.ObjectBE oBE = (atLogic.ObjectBE)dt.ExtendedProperties["BE"]; if (oBE == null) { if (dt.TableName == "Contact") { oBE = GetPerson(); } else { BEManager mngr = MyMngrs[dt.DataSet.DataSetName]; Type ty = mngr.GetType(); System.Reflection.MethodInfo mi = ty.GetMethod("Get" + dt.TableName); oBE = (atLogic.ObjectBE)mi.Invoke(mngr, null); } } return(oBE); }
public void AddForUpdate(ObjectBE obe) { updateList.Add(obe); }
public void AddForUpdate(ObjectBE obe, string before) { int i = FindOBE(before); updateList.Insert(i, obe); }