Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        //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);
            }
        }
Exemplo n.º 3
0
 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);
 }
Exemplo n.º 4
0
 public void AddForUpdate(ObjectBE obe)
 {
     updateList.Add(obe);
 }
Exemplo n.º 5
0
        public void AddForUpdate(ObjectBE obe, string before)
        {
            int i = FindOBE(before);

            updateList.Insert(i, obe);
        }