Пример #1
0
        public ClsKeys GetKeys(DataRow Dr, List <string> KeyNames)
        {
            bool    IsFound = false;
            ClsKeys Key     = new ClsKeys();

            foreach (string Inner_Key in KeyNames)
            {
                if (!Information.IsDBNull(Dr[Inner_Key]))
                {
                    Key.Add(Inner_Key, (Int64)Methods.IsNull(Dr[Inner_Key], 0));
                }
                else
                {
                    IsFound = true;
                    break;
                }
            }

            if (IsFound)
            {
                Key = null;
            }

            return(Key);
        }
Пример #2
0
        public ClsKeys GetKeys(DataRow Dr)
        {
            ClsKeys Obj = new ClsKeys();

            foreach (string Key in this.mHeader_Key)
            {
                Int64 ID = (Int64)Methods.IsNull(Dr[Key], 0);
                Obj.Add(Key, ID);
            }
            return(Obj);
        }
Пример #3
0
        //[-]

        public ClsKeys GetKeys()
        {
            ClsKeys Obj = new ClsKeys();

            foreach (string Key in this.mHeader_Key)
            {
                Int64 ID = Convert.ToInt64(Methods.IsNull(this.mHeader_Dr[Key], 0));
                Obj.Add(Key, ID);
            }
            return(Obj);
        }
Пример #4
0
        public override void Load(ClsKeys Keys = null)
        {
            base.Load(Keys);

            //[-]

            Int64 ContactPersonID = Convert.ToInt64(Do_Methods.IsNull(this.pDr["ContactPersonID"], 0));

            if (ContactPersonID != 0)
            {
                Keys = new ClsKeys();
                Keys.Add("ContactPersonID", ContactPersonID);
            }
            else
            { Keys = null; }

            this.mObj_ContactPerson.Load(Keys);

            //this.mObj_ShippingAddress.Load(Keys, this);

            //[-]

            //foreach (DataRow Dr in this.pDt_ShippingAddress.Rows)
            //{
            //    ClsAddress Inner_Obj = new ClsAddress(this.mCurrentUser);
            //    ClsKeys Inner_Keys = null;
            //    Int64 Inner_ID = Convert.ToInt64(Do_Methods.IsNull(Dr["AddressID"], 0));
            //    if (Inner_ID != 0)
            //    {
            //        Inner_Keys = new ClsKeys();
            //        Inner_Keys.Add("AddressID", Inner_ID);
            //    }
            //    Inner_Obj.Load(Inner_Keys);
            //    this.mBO_ShippingAddress_Address.Add(Convert.ToInt64(Do_Methods.IsNull(Dr["TmpKey"], 0)).ToString(), Inner_Obj);
            //}
        }