예제 #1
0
 private void EnemyShoot()
 {
     if (Row0.Count > 0)
     {
         int        i     = Random.Range(0, Row0.Count - 1);
         GameObject enemy = Row0.ElementAt(i);
         enemy.SendMessage("Shoot");
     }
     else if (Row1.Count > 0)
     {
         int        i     = Random.Range(0, Row1.Count - 1);
         GameObject enemy = Row1.ElementAt(i);
         enemy.SendMessage("Shoot");
     }
     else if (Row2.Count > 0)
     {
         int        i     = Random.Range(0, Row2.Count - 1);
         GameObject enemy = Row2.ElementAt(i);
         enemy.SendMessage("Shoot");
     }
     else if (Row3.Count > 0)
     {
         int        i     = Random.Range(0, Row3.Count - 1);
         GameObject enemy = Row3.ElementAt(i);
         enemy.SendMessage("Shoot");
     }
     else if (Row4.Count > 0)
     {
         int        i     = Random.Range(0, Row4.Count - 1);
         GameObject enemy = Row4.ElementAt(i);
         enemy.SendMessage("Shoot");
     }
 }
예제 #2
0
        public void Clear(bool fillEmpty)
        {
            if (Row1 == null)
            {
                Row1 = new List <GenericWorldItem>(3);
                Row2 = new List <GenericWorldItem>(3);
                Row3 = new List <GenericWorldItem>(3);
            }
            else
            {
                Row1.Clear();
                Row2.Clear();
                Row3.Clear();
            }

            if (fillEmpty)
            {
                for (int i = 0; i < 3; i++)
                {
                    Row1.Add(null);
                    Row2.Add(null);
                    Row3.Add(null);
                }
            }

            GenericResult = null;
            //CustomResult	= null;
        }
        protected override void OnPaint(PaintEventArgs e)
        {
            if (!isDrawn)
            {
                Graphics g = this.CreateGraphics();
                Block block = new Block(Brushes.Invisible, g, 0, 0, 0, 0, false);
                block = new Row1().AddRow(block);
                block = new Row2().AddRow(block);
                block = new Row3().AddRow(block);
                block = new Row4().AddRow(block);
                block = new Row5().AddRow(block);
                block = new Row6().AddRow(block);
                block = new Row7().AddRow(block);
                block = new Row8().AddRow(block);
                block = new Row9().AddRow(block);
                block = new Row10().AddRow(block);
                block = new Row11().AddRow(block);
                block = new Row12().AddRow(block);
                block = new Row13().AddRow(block);
                block = new Row14().AddRow(block);

                if (DrawDiamondOnlyAtEnd) CutOutDiamond(g);

                isDrawn = true;
            }
            base.OnPaint(e);
        }
예제 #4
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="other"></param>
 /// <param name="factor"></param>
 /// <returns></returns>
 public Matrix4d LerpTo(Matrix4d other, double factor)
 {
     return(CreateFromRows(
                Row0.LerpTo(other.Row0, factor),
                Row1.LerpTo(other.Row1, factor),
                Row2.LerpTo(other.Row2, factor),
                Row3.LerpTo(other.Row3, factor)));
 }
예제 #5
0
        public List <ClsProducerTrackAndBeatList> GetProducerTrackAndBeatList(Int64 ProducersID, Int64 UserID)
        {
            try
            {
                DBParameterCollection ObJParameterCOl = new DBParameterCollection();
                DBParameter           objDBParameter  = new DBParameter("@ProducersID", ProducersID, DbType.Int64);
                ObJParameterCOl.Add(objDBParameter);
                objDBParameter = new DBParameter("@UserID", UserID, DbType.Int64);
                ObJParameterCOl.Add(objDBParameter);

                DBHelper objDbHelper = new DBHelper();
                DataSet  User        = objDbHelper.ExecuteDataSet(Constant.GetProducerTrackAndBeatList, ObJParameterCOl, CommandType.StoredProcedure);

                List <ClsProducerTrackAndBeatList> objProducerTrackAndBeat = new List <ClsProducerTrackAndBeatList>();

                if (User != null)
                {
                    if (User.Tables[0].Rows.Count > 0)
                    {
                        objProducerTrackAndBeat = User.Tables[0].AsEnumerable().Select(Row =>
                                                                                       new ClsProducerTrackAndBeatList
                        {
                            ProducerName = Row.Field <string>("ProducerName"),
                            ProfilePhoto = Row.Field <string>("ProfilePhoto"),
                            ProducerBio  = Row.Field <string>("ProducerBio"),
                            ProducerFrom = Row.Field <string>("ProducerFrom"),
                            Followed     = Row.Field <string>("Followed"),
                            Followers    = Row.Field <Int64>("Followers"),
                            Following    = Row.Field <Int64>("Following"),
                            Plays        = Row.Field <Int64>("Plays"),
                            TrackAndBeat = User.Tables[1].AsEnumerable().Select(Row1 =>
                                                                                new ClsTrackAndBeatList
                            {
                                Ref_Track_ID      = Row1.Field <Int64>("Ref_Track_ID"),
                                CategoryName      = Row1.Field <string>("CategoryName"),
                                TrackName         = Row1.Field <string>("TrackName"),
                                TrackType         = Row1.Field <string>("TrackType"),
                                Bio               = Row1.Field <string>("Bio"),
                                Duration          = Row1.Field <string>("Duration"),
                                Price             = Row1.Field <decimal>("Price"),
                                BMP               = Row1.Field <int>("BMP"),
                                Plays             = Row1.Field <Int64>("Plays"),
                                ThumbnailImageUrl = Row1.Field <string>("Thumbnail"),
                                TrackStatus       = Row1.Field <string>("TrackStatus"),
                                Favourite         = Row1.Field <string>("Favourite"),
                                IsTrack           = Row1.Field <string>("IsTrack"),
                                SoldOut           = Row1.Field <string>("SoldOut"),
                            }).ToList(),
                        }).ToList();
                    }
                }
                return(objProducerTrackAndBeat);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
예제 #6
0
        public List <ClsCategoryDetails> GetCategoryList(string Flag, Int64 Ref_Category_ID, string AliasName)
        {
            try
            {
                DBParameterCollection ObJParameterCOl = new DBParameterCollection();
                DBParameter           objDBParameter  = new DBParameter("@Flag", Flag, DbType.String);
                ObJParameterCOl.Add(objDBParameter);
                objDBParameter = new DBParameter("@Ref_Category_ID", Ref_Category_ID, DbType.Int64);
                ObJParameterCOl.Add(objDBParameter);
                objDBParameter = new DBParameter("@AliasName", AliasName, DbType.String);
                ObJParameterCOl.Add(objDBParameter);

                DBHelper objDbHelper = new DBHelper();
                DataSet  ds          = objDbHelper.ExecuteDataSet(Constant.GetCategoryList, ObJParameterCOl, CommandType.StoredProcedure);

                List <ClsCategoryDetails> objCategoryList = new List <ClsCategoryDetails>();

                if (ds != null)
                {
                    if (ds.Tables[0].Rows.Count > 0)
                    {
                        objCategoryList = ds.Tables[0].AsEnumerable().Select(Row =>
                                                                             new ClsCategoryDetails
                        {
                            Ref_Category_ID = Row.Field <Int64>("Ref_Category_ID"),
                            Ref_Parent_ID   = Row.Field <Int64>("Ref_Parent_ID"),
                            CategoryName    = Row.Field <string>("CategoryName"),
                            AliasName       = Row.Field <string>("AliasName"),
                            CategoryUseBy   = Row.Field <Int64>("CategoryUseBy"),
                            Description     = Row.Field <string>("Description"),
                            IsActive        = Row.Field <Boolean>("IsActive"),
                            MetaTitle       = Row.Field <string>("MetaTitle"),
                            MetaKeywords    = Row.Field <string>("MetaKeywords"),
                            MetaDescription = Row.Field <string>("MetaDescription"),
                            FileManager     = ds.Tables[1].AsEnumerable().Where(x => x.Field <Int64>("ModuleID") == Row.Field <Int64>("Ref_Category_ID")).Select(Row1 =>
                                                                                                                                                                 new ClsFileManager
                            {
                                FileManagerID  = Row1.Field <Int64>("Ref_FileManager_ID"),
                                FileIdentifier = Row1.Field <string>("FileIdentifier"),
                                FileName       = Row1.Field <string>("FileName"),
                                FilePath       = Row1.Field <string>("FilePath"),
                                FileExtension  = Row1.Field <string>("FileExtension"),
                                FileSize       = Row1.Field <Int64>("FileSize"),
                                FileType       = Row1.Field <string>("FileType"),
                                Sequence       = Row1.Field <int>("Sequence"),
                            }).ToList(),
                        }).ToList();
                    }
                }
                return(objCategoryList);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
예제 #7
0
        public List <ClsCustomServiceDetails> GetCustomServiceDetails(Int64 ServiceID)
        {
            try
            {
                DBParameterCollection ObJParameterCOl = new DBParameterCollection();
                DBParameter           objDBParameter  = new DBParameter("@ServiceID", ServiceID, DbType.Int64);
                ObJParameterCOl.Add(objDBParameter);

                DBHelper objDbHelper = new DBHelper();
                DataSet  ds          = objDbHelper.ExecuteDataSet(Constant.GetCustomServiceDetails, ObJParameterCOl, CommandType.StoredProcedure);
                List <ClsCustomServiceDetails> objService = new List <ClsCustomServiceDetails>();

                if (ds != null)
                {
                    if (ds.Tables[0].Rows.Count > 0)
                    {
                        IList <ClsCustomServiceDetails> List = ds.Tables[0].AsEnumerable().Select(Row =>
                                                                                                  new ClsCustomServiceDetails
                        {
                            Ref_Service_ID        = Row.Field <Int64>("Ref_Service_ID"),
                            CategoryName          = Row.Field <string>("CategoryName"),
                            ServiceTitle          = Row.Field <string>("ServiceTitle"),
                            Description           = Row.Field <string>("Description"),
                            Revision              = Row.Field <int>("Revision"),
                            Price                 = Row.Field <decimal>("Price"),
                            PriceWithProjectFiles = Row.Field <decimal>("PriceWithProjectFiles"),
                            FAQList               = ds.Tables[1].AsEnumerable().Select(Row1 =>
                                                                                       new ClsFAQList
                            {
                                Questions = Row1.Field <string>("Question"),
                                Answer    = Row1.Field <string>("Answer")
                            }).ToList(),
                            FileManager = ds.Tables[2].AsEnumerable().Select(Row2 =>
                                                                             new ClsFileManager
                            {
                                FileManagerID  = Row2.Field <Int64>("Ref_FileManager_ID"),
                                FileIdentifier = Row2.Field <string>("FileIdentifier"),
                                FileName       = Row2.Field <string>("FileName"),
                                FilePath       = Row2.Field <string>("FilePath"),
                                FileExtension  = Row2.Field <string>("FileExtension"),
                                FileSize       = Row2.Field <Int64>("FileSize"),
                                FileType       = Row2.Field <string>("FileType"),
                                Sequence       = Row2.Field <int>("Sequence"),
                            }).ToList(),
                        }).ToList();
                        objService.AddRange(List);
                    }
                }
                return(objService);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
예제 #8
0
        /// <summary>マトリックスデータを取得 float[25]</summary>
        /// <returns></returns>
        public float[] GetMatrix()
        {
            var m = new float[25];

            m[24] = 1;

            try
            {
                var f = Row1.Split(',').Take(4).ToArray();
                for (var i = 0; i < f.Length; i++)
                {
                    m[i] = float.Parse(f[i]);
                }

                f = Row2.Split(',').Take(4).ToArray();
                for (var i = 0; i < f.Length; i++)
                {
                    m[i + 5] = float.Parse(f[i]);
                }

                f = Row3.Split(',').Take(4).ToArray();
                for (var i = 0; i < f.Length; i++)
                {
                    m[i + 10] = float.Parse(f[i]);
                }

                f = Row4.Split(',').Take(4).ToArray();
                for (var i = 0; i < f.Length; i++)
                {
                    m[i + 15] = float.Parse(f[i]);
                }

                f = Row5.Split(',').Take(4).ToArray();
                for (var i = 0; i < f.Length; i++)
                {
                    m[i + 20] = float.Parse(f[i]);
                }
            }
            catch
            {
                // 設定ファイルに不正データがあった場合 反転なし状態で初期化
                // (パース失敗がわかりやすいので)
                m     = new float[25];
                m[0]  = 1;
                m[6]  = 1;
                m[12] = 1;
                m[18] = 1;
                m[24] = 1;
            }

            return(m);
        }
예제 #9
0
        //======================
        private void LoadData()
        {
            DataTable dt1 = dbClass.Execute_Proc("dbo.GetTags");

            foreach (DataRow Row1 in dt1.Rows)
            {
                Tag tag = new Tag
                          (
                    Row1.Field <int?>("TagID"),
                    Row1.Field <int?>("ParentCategoryID"),
                    Row1.Field <string>("Name"),
                    Row1.Field <string>("ColorID"),
                    Row1.Field <bool?>("IsUserCreated"),
                    Row1.Field <bool?>("IsFeelingGoodBad")
                          );

                if (tag.ParentCategoryID == null)
                {
                    TagViewModel.CategoryTagList.Add(tag);
                }
                else
                {
                    TagViewModel.SubcategoryTagList.Add(tag);
                }
            }

            DataTable dt2 = dbClass.Execute_Proc("dbo.GetFoodEntrys");

            foreach (DataRow Row2 in dt2.Rows)
            {
                FoodEntry foodEntry = new FoodEntry
                                      (
                    Row2.Field <int?>("FoodEntryId"),
                    Row2.Field <string>("Picture"),
                    Row2.Field <DateTime>("DateTime"),
                    Row2.Field <string>("Description"),
                    Row2.Field <bool?>("IsFeelingGoodBad")
                                      );

                DataTable dt3 = dbClass.GetFoodEntry_Tags("dbo.GetFoodEntry_Tags", (int)foodEntry.FoodEntryID);
                foreach (DataRow Row3 in dt3.Rows)
                {
                    int TagID    = Row3.Field <int>("TagID");
                    Tag foundTag = TagViewModel.SubcategoryTagList.Where(tag => TagID == tag.TagID).FirstOrDefault();
                    foodEntry.FoodEntry_TagList.Add(foundTag);
                }

                EntryViewModel.FoodEntryList.Add(foodEntry);
            }
        }
예제 #10
0
        /// <summary>
        /// Updates denominator table
        /// </summary>
        /// <param name="denominatorColIndex"></param>
        /// <param name="appliedColIndexes"></param>
        public void UpdateDenominatorTable(int denominatorColIndex, string appliedColIndexes)
        {
            DataRow   NewRow;
            DataTable TempTable;
            String    TempAppliedColIndex = string.Empty;

            // update denominator column info
            if (this._DenominatorTable != null)
            {
                // delete already mapped row where denominator column is equal to denominator column index
                foreach (DataRow Row in this._DenominatorTable.Select(DenominatorColumns.DenominatorColumn + " = '" + denominatorColIndex.ToString() + "'"))
                {
                    Row.Delete();
                }

                // delete already mapped row where denominator column is equal to applied column indexes
                foreach (string appliedColIndex in DICommon.SplitString(appliedColIndexes, ","))
                {
                    if (TempAppliedColIndex.Length > 0)
                    {
                        TempAppliedColIndex += ",";
                    }
                    TempAppliedColIndex = "'" + appliedColIndex + "'";
                }

                foreach (DataRow Row1 in this._DenominatorTable.Select(DenominatorColumns.DenominatorColumn + " IN ( " + TempAppliedColIndex + ")"))
                {
                    Row1.Delete();
                }

                // delete already mapped row where applied column is equal to denominator column
                foreach (DataRow Row2 in this._DenominatorTable.Select(DenominatorColumns.AppliedColumn + " = '" + denominatorColIndex + "'"))
                {
                    Row2.Delete();
                }


                // add denominator column index and applied columns indexes
                foreach (string appliedColIndex in DICommon.SplitString(appliedColIndexes, ","))
                {
                    NewRow = this._DenominatorTable.NewRow();
                    NewRow[DenominatorColumns.DenominatorColumn] = denominatorColIndex.ToString();
                    NewRow[DenominatorColumns.AppliedColumn]     = appliedColIndex;
                    this._DenominatorTable.Rows.Add(NewRow);
                }

                this._DenominatorTable.AcceptChanges();
            }
        }
예제 #11
0
        private string BuildLine(IReadOnlyList <ColumnX> columns)
        {
            verticalBorderCount = columns.Count + 1;
            row1VerticalBorders = Row1?.CalculateVerticalBorderVisibility(columns.Count) ?? Enumerable.Repeat(false, verticalBorderCount).ToList();
            row2VerticalBorders = Row2?.CalculateVerticalBorderVisibility(columns.Count) ?? Enumerable.Repeat(false, verticalBorderCount).ToList();

            StringBuilder sb = new();

            for (int i = 0; i < columns.Count; i++)
            {
                char cornerChar = CalculateCornerChar(i);
                sb.Append(cornerChar);

                char   bodyChar = CalculateBodyChar();
                string bodyLine = new(bodyChar, columns[i].Width);
        public List <ClsModuleList> GetUserModuleAccess(Int64 UserID, Int64 ModuleID)
        {
            try
            {
                DBParameterCollection ObJParameterCOl = new DBParameterCollection();
                DBParameter           objDBParameter  = new DBParameter("@UserID", UserID, DbType.Int64);
                ObJParameterCOl.Add(objDBParameter);
                objDBParameter = new DBParameter("@ModuleID", ModuleID, DbType.Int64);
                ObJParameterCOl.Add(objDBParameter);

                DBHelper             objDbHelper   = new DBHelper();
                DataSet              ds            = objDbHelper.ExecuteDataSet(Constant.GetUserModuleAccess, ObJParameterCOl, CommandType.StoredProcedure);
                List <ClsModuleList> objModuleList = new List <ClsModuleList>();

                if (ds != null)
                {
                    if (ds.Tables[0].Rows.Count > 0)
                    {
                        IList <ClsModuleList> List = ds.Tables[0].AsEnumerable().Select(Row =>
                                                                                        new ClsModuleList
                        {
                            Ref_Module_ID    = Row.Field <Int64>("Ref_Module_ID"),
                            ModuleIdentifier = Row.Field <string>("ModuleIdentifier"),
                            ModuleName       = Row.Field <string>("ModuleName"),
                            ModuleType       = Row.Field <string>("ModuleType"),
                            ModuleFor        = Row.Field <string>("ModuleFor"),
                            ImageUrl         = Row.Field <string>("ImageUrl"),
                            ModuleUrl        = Row.Field <string>("ModuleUrl"),
                            DisplayOrder     = Row.Field <int>("DisplayOrder"),
                            ModuleAccess     = ds.Tables[1].AsEnumerable().Where(x => x.Field <Int64>("Ref_Module_ID") == Row.Field <Int64>("Ref_Module_ID")).Select(Row1 =>
                                                                                                                                                                     new ClsModuleAccess
                            {
                                View     = Row1.Field <Boolean>("ViewAccess"),
                                Edit     = Row1.Field <Boolean>("EditAccess"),
                                Delete   = Row1.Field <Boolean>("DeleteAccess"),
                                Approval = Row1.Field <Boolean>("ApprovalAccess")
                            }).ToList()
                        }).ToList();
                        objModuleList.AddRange(List);
                    }
                }
                return(objModuleList);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
예제 #13
0
        public List <ClsBannerDetails> GetBannersList(Int64 BannerID)
        {
            try
            {
                DBParameterCollection ObJParameterCOl = new DBParameterCollection();
                DBParameter           objDBParameter  = new DBParameter("@Ref_Banner_ID", BannerID, DbType.Int64);
                ObJParameterCOl.Add(objDBParameter);
                DBHelper objDbHelper = new DBHelper();
                DataSet  ds          = objDbHelper.ExecuteDataSet(Constant.GetBannersList, ObJParameterCOl, CommandType.StoredProcedure);
                List <ClsBannerDetails> objUserMaster = new List <ClsBannerDetails>();

                if (ds != null)
                {
                    if (ds.Tables[0].Rows.Count > 0)
                    {
                        IList <ClsBannerDetails> List = ds.Tables[0].AsEnumerable().Select(Row =>
                                                                                           new ClsBannerDetails
                        {
                            Ref_Banner_ID  = Row.Field <Int64>("Ref_Banner_ID"),
                            BannerTitle    = Row.Field <string>("BannerTitle"),
                            BannerPageName = Row.Field <string>("BannerPageName"),
                            Descripation   = Row.Field <string>("Descripation"),
                            IsActive       = Row.Field <Boolean>("IsActive"),
                            CreatedBy      = Row.Field <string>("CreatedBy"),
                            FileManager    = ds.Tables[1].AsEnumerable().Where(x => x.Field <Int64>("ModuleID") == Row.Field <Int64>("Ref_Banner_ID")).Select(Row1 =>
                                                                                                                                                              new ClsFileManager
                            {
                                FileManagerID  = Row1.Field <Int64>("Ref_FileManager_ID"),
                                FileIdentifier = Row1.Field <string>("FileIdentifier"),
                                FileName       = Row1.Field <string>("FileName"),
                                FilePath       = Row1.Field <string>("FilePath"),
                                FileExtension  = Row1.Field <string>("FileExtension"),
                                FileSize       = Row1.Field <Int64>("FileSize"),
                                FileType       = Row1.Field <string>("FileType"),
                                Sequence       = Row1.Field <int>("Sequence"),
                            }).ToList(),
                        }).ToList();
                        objUserMaster.AddRange(List);
                    }
                }
                return(objUserMaster);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
예제 #14
0
        public List <ClsCouponDetails> GetCouponCodeList()
        {
            try
            {
                DBHelper objDbHelper = new DBHelper();
                DataSet  Ds          = objDbHelper.ExecuteDataSet(Constant.GetCouponCodeList, CommandType.StoredProcedure);
                List <ClsCouponDetails> ObjCouponDetails = new List <ClsCouponDetails>();

                if (Ds != null)
                {
                    if (Ds.Tables.Count > 0)
                    {
                        if (Ds.Tables[0].Rows.Count > 0)
                        {
                            IList <ClsCouponDetails> List = Ds.Tables[0].AsEnumerable().Select(Row =>
                                                                                               new ClsCouponDetails
                            {
                                Ref_Coupon_ID        = Row.Field <Int64>("Ref_Coupon_ID"),
                                CouponCode           = Row.Field <string>("CouponCode"),
                                Description          = Row.Field <string>("Description"),
                                CouponUseBy          = Row.Field <string>("CouponUseBy"),
                                DiscountInMax        = Row.Field <Decimal>("DiscountInMax"),
                                DiscountInPercentage = Row.Field <Decimal>("DiscountInPercentage"),
                                StartDate            = Row.Field <DateTime>("StartDate"),
                                EndDate         = Row.Field <DateTime>("EndDate"),
                                OneTimeUse      = Row.Field <Boolean>("OneTimeUse"),
                                OnlyForNewUsers = Row.Field <Boolean>("OnlyForNewUsers"),
                                AudienceCount   = Row.Field <int>("AudienceCount"),
                                IsActive        = Row.Field <Boolean>("IsActive"),
                                CouponObject    = Ds.Tables[1].AsEnumerable().Where(x => x.Field <Int64>("Ref_Coupon_ID") == Row.Field <Int64>("Ref_Coupon_ID")).Select(Row1 =>
                                                                                                                                                                        new ClsCouponObject
                                {
                                    ObjectType    = Row1.Field <string>("ObjectType"),
                                    Ref_Object_ID = Row1.Field <Int64>("Ref_Object_ID")
                                }).ToList()
                            }).ToList();
                            ObjCouponDetails.AddRange(List);
                        }
                    }
                }
                return(ObjCouponDetails);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
예제 #15
0
    private void SpawnRows()
    {
        for (int row = 0; row < enemyRows; row++)
        {
            for (int enemiesInRow = 0; enemiesInRow < enemiesPerRow; enemiesInRow++)
            {
                GameObject enemyPrefab = attackerPrefab;
                if ((row == 2) || (row == 3))
                {
                    enemyPrefab = hornetPrefab;
                }
                else if (row == 4)
                {
                    enemyPrefab = bomberPrefab;
                }
                Vector3    position = firstEnemyPosition + (enemiesInRow * horizontalGap) + (row * verticalGap);
                GameObject enemy    = Instantiate(enemyPrefab, position, Quaternion.Euler(0, 0, 0));

                switch (row)
                {
                case 0:
                    Row0.Add(enemy);
                    break;

                case 1:
                    Row1.Add(enemy);
                    break;

                case 2:
                    Row2.Add(enemy);
                    break;

                case 3:
                    Row3.Add(enemy);
                    break;

                case 4:
                    Row4.Add(enemy);
                    break;

                default:
                    break;
                }
                enemy.SendMessage("ChangeSpeed", initialEnemySpeed);
            }
        }
    }
예제 #16
0
        private void HalconWin_HMouseMove(object sender, HMouseEventArgs e)
        {
            HTuple Window = new HTuple();

            Window = HalconWin.HalconWindow;
            HTuple Row1, Col1, Button;

            try
            {
                HOperatorSet.GetMposition(Window, out Row1, out Col1, out Button);
                StatusLblX.Text = Col1.ToString();
                StatusLblY.Text = Row1.ToString();
            }
            catch
            {
            }
        }
예제 #17
0
        private void UpdateRect(object sender, ElapsedEventArgs e)
        {
            Application.Current.Dispatcher.Invoke(
                delegate {
                var mousePos = FormsControl.MousePosition;

                _cropRegion.X2 = mousePos.X;
                _cropRegion.Y2 = mousePos.Y;

                Row0.SetValue(RowDefinition.HeightProperty, new GridLength(_cropRegion.TopLeft.Y + TopLeftOffset, GridUnitType.Pixel));
                Row1.SetValue(RowDefinition.HeightProperty, new GridLength(_cropRegion.BottomRight.Y - _cropRegion.TopLeft.Y, GridUnitType.Pixel));
                Row2.SetValue(RowDefinition.HeightProperty, new GridLength(1, GridUnitType.Star));
                Col0.SetValue(ColumnDefinition.WidthProperty, new GridLength(_cropRegion.TopLeft.X + TopLeftOffset, GridUnitType.Pixel));
                Col1.SetValue(ColumnDefinition.WidthProperty, new GridLength(_cropRegion.BottomRight.X - _cropRegion.TopLeft.X, GridUnitType.Pixel));
                Col2.SetValue(ColumnDefinition.WidthProperty, new GridLength(1, GridUnitType.Star));
            }
                );
        }
예제 #18
0
        public void Compare_Correct()
        {
            Assert.AreEqual(0, Row.Empty.CompareTo(Row.Empty));
            Assert.AreEqual(-1, Row.Empty.CompareTo(Row1));
            Assert.AreEqual(-1, Row.Empty.CompareTo(Row2));
            Assert.AreEqual(-1, Row.Empty.CompareTo(Row3));
            Assert.AreEqual(-1, Row.Empty.CompareTo(Row4));
            Assert.AreEqual(-1, Row.Empty.CompareTo(Row5));

            Assert.AreEqual(1, Row1.CompareTo(Row.Empty));
            Assert.AreEqual(0, Row1.CompareTo(Row1));
            Assert.AreEqual(-1, Row1.CompareTo(Row2));
            Assert.AreEqual(-1, Row1.CompareTo(Row3));
            Assert.AreEqual(-1, Row1.CompareTo(Row4));
            Assert.AreEqual(-1, Row1.CompareTo(Row5));

            Assert.AreEqual(1, Row2.CompareTo(Row.Empty));
            Assert.AreEqual(1, Row2.CompareTo(Row1));
            Assert.AreEqual(0, Row2.CompareTo(Row2));
            Assert.AreEqual(-1, Row2.CompareTo(Row3));
            Assert.AreEqual(-1, Row2.CompareTo(Row4));
            Assert.AreEqual(-1, Row2.CompareTo(Row5));

            Assert.AreEqual(1, Row3.CompareTo(Row.Empty));
            Assert.AreEqual(1, Row3.CompareTo(Row1));
            Assert.AreEqual(1, Row3.CompareTo(Row2));
            Assert.AreEqual(0, Row3.CompareTo(Row3));
            Assert.AreEqual(-1, Row3.CompareTo(Row4));
            Assert.AreEqual(-1, Row3.CompareTo(Row5));

            Assert.AreEqual(1, Row4.CompareTo(Row.Empty));
            Assert.AreEqual(1, Row4.CompareTo(Row1));
            Assert.AreEqual(1, Row4.CompareTo(Row2));
            Assert.AreEqual(1, Row4.CompareTo(Row3));
            Assert.AreEqual(0, Row4.CompareTo(Row4));
            Assert.AreEqual(-1, Row4.CompareTo(Row5));

            Assert.AreEqual(1, Row5.CompareTo(Row.Empty));
            Assert.AreEqual(1, Row5.CompareTo(Row1));
            Assert.AreEqual(1, Row5.CompareTo(Row2));
            Assert.AreEqual(1, Row5.CompareTo(Row3));
            Assert.AreEqual(1, Row5.CompareTo(Row4));
            Assert.AreEqual(0, Row5.CompareTo(Row5));
        }
        public List <ClsAuthority> GetAuthorityDetails(Int64 AuthorityID)
        {
            try
            {
                DBParameterCollection ObJParameterCOl = new DBParameterCollection();
                DBParameter           objDBParameter  = new DBParameter("@AuthorityID", AuthorityID, DbType.Int64);
                ObJParameterCOl.Add(objDBParameter);

                DBHelper            objDbHelper       = new DBHelper();
                DataSet             ds                = objDbHelper.ExecuteDataSet(Constant.GetAuthorityDetails, ObJParameterCOl, CommandType.StoredProcedure);
                List <ClsAuthority> objUserMasterData = new List <ClsAuthority>();

                if (ds != null)
                {
                    if (ds.Tables[0].Rows.Count > 0)
                    {
                        IList <ClsAuthority> List = ds.Tables[0].AsEnumerable().Select(Row =>
                                                                                       new ClsAuthority
                        {
                            Ref_Authority_ID = Row.Field <Int64>("Ref_Authority_ID"),
                            AuthorityName    = Row.Field <string>("AuthorityName"),
                            AuthorityType    = Row.Field <string>("AuthorityType"),
                            Description      = Row.Field <string>("Description"),
                            MasterDataIDs    = Row.Field <string>("MasterDataIDs"),
                            ModuleAccess     = ds.Tables[1].AsEnumerable().Select(Row1 =>
                                                                                  new ClsModuleAccess
                            {
                                Ref_Module_ID = Row1.Field <Int64>("Ref_Module_ID"),
                                View          = Row1.Field <Boolean>("ViewAccess"),
                                Edit          = Row1.Field <Boolean>("EditAccess"),
                                Delete        = Row1.Field <Boolean>("DeleteAccess"),
                                Approval      = Row1.Field <Boolean>("ApprovalAccess")
                            }).ToList()
                        }).ToList();
                        objUserMasterData.AddRange(List);
                    }
                }
                return(objUserMasterData);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
예제 #20
0
        public List <ClsParentUserMaster> GetParentUserMasterList(Int64 UserMasterID)
        {
            try
            {
                DBParameterCollection ObJParameterCOl = new DBParameterCollection();
                DBParameter           objDBParameter  = new DBParameter("@Ref_UserMaster_ID", UserMasterID, DbType.Int64);
                ObJParameterCOl.Add(objDBParameter);

                DBHelper objDbHelper = new DBHelper();
                DataSet  ds          = objDbHelper.ExecuteDataSet(Constant.GetParentUserMasterList, ObJParameterCOl, CommandType.StoredProcedure);
                List <ClsParentUserMaster> objUserMasterData = new List <ClsParentUserMaster>();

                if (ds != null)
                {
                    if (ds.Tables[0].Rows.Count > 0)
                    {
                        IList <ClsParentUserMaster> List = ds.Tables[0].AsEnumerable().Select(Row =>
                                                                                              new ClsParentUserMaster
                        {
                            Ref_UserMaster_ID = Row.Field <Int64>("Ref_UserMaster_ID"),
                            UserMaster        = Row.Field <string>("MasterName"),
                            ControlName       = Row.Field <string>("ControlName"),
                            IsMandatory       = Row.Field <Boolean>("IsMandatory"),
                            userMasterData    = ds.Tables[1].AsEnumerable().Where(x => x.Field <Int64>("Ref_UserMaster_ID") == Row.Field <Int64>("Ref_UserMaster_ID")).Select(Row1 =>
                                                                                                                                                                              new ClsUserMasterData
                            {
                                Ref_UserMasterData_ID = Row1.Field <Int64>("Ref_UserMasterData_ID"),
                                UserMasterData        = Row1.Field <string>("MasterDataName")
                            }).ToList()
                        }).ToList();
                        objUserMasterData.AddRange(List);
                    }
                }
                return(objUserMasterData);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        void ReleaseDesignerOutlets()
        {
            if (Row1 != null)
            {
                Row1.Dispose();
                Row1 = null;
            }

            if (Row2 != null)
            {
                Row2.Dispose();
                Row2 = null;
            }

            if (Row3 != null)
            {
                Row3.Dispose();
                Row3 = null;
            }

            if (Row4 != null)
            {
                Row4.Dispose();
                Row4 = null;
            }

            if (Row5 != null)
            {
                Row5.Dispose();
                Row5 = null;
            }

            if (Shift != null)
            {
                Shift.Dispose();
                Shift = null;
            }
        }
예제 #22
0
 public override int GetHashCode()
 {
     return(Col1.GetHashCode() ^ Col2.GetHashCode() ^ Dx1.GetHashCode()
            ^ Dx2.GetHashCode() ^ Dy1.GetHashCode() ^ Dy2.GetHashCode()
            ^ Row1.GetHashCode() ^ Row2.GetHashCode() ^ AnchorType.GetHashCode());
 }
예제 #23
0
        public string FTP_CASantaBarbara(string houseno, string sname, string sttype, string parcelNumber, string unitnumber, string searchType, string orderNumber, string ownername, string directParcel)
        {
            GlobalClass.global_orderNo             = orderNumber;
            HttpContext.Current.Session["orderNo"] = orderNumber;
            GlobalClass.global_parcelNo            = parcelNumber;

            string StartTime = "", AssessmentTime = "", TaxTime = "", CitytaxTime = "", LastEndTime = "";

            var driverService = PhantomJSDriverService.CreateDefaultService();

            driverService.HideCommandPromptWindow = true;
            // driver = new PhantomJSDriver();
            // driver = new ChromeDriver();
            using (driver = new PhantomJSDriver())
            {
                try
                {
                    StartTime = DateTime.Now.ToString("HH:mm:ss");

                    if (searchType == "titleflex")
                    {
                        gc.TitleFlexSearch(orderNumber, parcelNumber, ownername, "", "CA", "Santa Barbara");
                        if (HttpContext.Current.Session["titleparcel"] != null && ownername.Trim() != "")
                        {
                            string[] strowner = ownername.Split(' ');
                            gc.TitleFlexSearch(orderNumber, parcelNumber, strowner[0], "", "CA", "Santa Barbara");
                        }
                        if ((HttpContext.Current.Session["TitleFlex_Search"] != null && HttpContext.Current.Session["TitleFlex_Search"].ToString() == "Yes"))
                        {
                            driver.Quit();
                            return("MultiParcel");
                        }
                        else if (HttpContext.Current.Session["titleparcel"].ToString() == "")
                        {
                            HttpContext.Current.Session["Nodata_CASantaBarbara"] = "Zero";
                            driver.Quit();
                            return("No Data Found");
                        }
                        searchType   = "parcel";
                        parcelNumber = HttpContext.Current.Session["titleparcel"].ToString();
                    }

                    if (searchType == "address")
                    {
                        driver.Navigate().GoToUrl("http://www.sbcvote.com/assessor/search.aspx");
                        Thread.Sleep(2000);
                        driver.FindElement(By.Id("HouseNumberTextBox")).SendKeys(houseno);
                        driver.FindElement(By.Id("StreetNameTextBox")).SendKeys(sname);
                        driver.FindElement(By.Id("UnitNumberTextBox")).SendKeys(unitnumber);
                        //Screen-Shot
                        gc.CreatePdf_WOP(orderNumber, "AddressSearch", driver, "CA", "Santa Barbara");
                        driver.FindElement(By.Id("SearchButton")).SendKeys(Keys.Enter);
                        Thread.Sleep(2000);

                        //MultiParcel
                        try
                        {
                            IWebElement         MultiParcelTable = driver.FindElement(By.XPath("/html/body/form/table/tbody/tr[2]/td[2]/table/tbody/tr[2]/td/table/tbody/tr[2]/td[2]/table/tbody/tr[3]/td[2]/table/tbody/tr[5]/td/table"));
                            IList <IWebElement> MultiParcelTR    = MultiParcelTable.FindElements(By.TagName("tr"));
                            IList <IWebElement> MultiParcelTD;

                            foreach (IWebElement multi in MultiParcelTR)
                            {
                                MultiParcelTD = multi.FindElements(By.TagName("td"));
                                if (multi.Text.Contains("Assessor Parcel Number (APN)"))
                                {
                                    strAssess = "MultiParcel";
                                }
                                if (MultiParcelTD.Count != 0 && strAssess.Trim() == "MultiParcel" && !multi.Text.Contains("Assessor Parcel Number (APN)") && MultiParcelTD.Count != 1 && MultiParcelTD[1].Text != "")
                                {
                                    HttpContext.Current.Session["multiParcel_CASantaBarbara"] = "Yes";
                                    parcelNumber    = MultiParcelTD[1].Text;
                                    Situs_Address   = MultiParcelTD[2].Text;
                                    MultiParcelData = Situs_Address;
                                    gc.insert_date(orderNumber, parcelNumber, 220, MultiParcelData, 1, DateTime.Now);
                                }
                            }
                            if (strAssess == "MultiParcel")
                            {
                                driver.Quit();
                                return("MultiParcel");
                            }
                        }
                        catch
                        { }
                    }

                    if (searchType == "parcel")
                    {
                        driver.Navigate().GoToUrl("http://www.sbcvote.com/assessor/search.aspx");
                        Thread.Sleep(2000);

                        driver.FindElement(By.Id("APNTextBox")).SendKeys(parcelNumber);
                        gc.CreatePdf(orderNumber, parcelNumber, "ParcelSearch", driver, "CA", "Santa Barbara");
                        driver.FindElement(By.Id("SearchButton")).SendKeys(Keys.Enter);
                        Thread.Sleep(2000);
                    }
                    try
                    {
                        IWebElement Inodata = driver.FindElement(By.Id("ErrorLabel"));
                        if (Inodata.Text.Contains("There were no properties matching your query"))
                        {
                            HttpContext.Current.Session["Nodata_CASantaBarbara"] = "Zero";
                            driver.Quit();
                            return("No Data Found");
                        }
                    }
                    catch { }
                    //Scrapped Data

                    //Property Deatails
                    string propdet = driver.FindElement(By.XPath("//*[@id='form1']/table/tbody/tr[2]/td[2]/table/tbody/tr[2]/td/table/tbody/tr[2]/td[2]/table/tbody/tr[3]/td[2]/table/tbody/tr[5]/td/table/tbody/tr[2]/td/table/tbody")).Text.Replace("\r\n", " ");
                    outparcelno        = gc.Between(propdet, "Parcel Number:", "Address:").Trim().Replace("Value Notice", "");
                    outparcelnowoh     = outparcelno.Replace("-", "").Trim();
                    Street_Address     = gc.Between(propdet, "Address:", "Transfer Date:").Trim().Replace("Value Notice", "");
                    TRA                = gc.Between(propdet, "TRA:", "Document").Trim();
                    Transfer_TaxAmount = GlobalClass.After(propdet, "Transfer Tax Amount:").Trim();

                    string propdet1 = driver.FindElement(By.XPath("//*[@id='form1']/table/tbody/tr[2]/td[2]/table/tbody/tr[2]/td/table/tbody/tr[2]/td[2]/table/tbody/tr[3]/td[2]/table/tbody/tr[5]/td/table/tbody/tr[3]/td/table")).Text.Replace("\r\n", " ");
                    Use_Description = gc.Between(propdet1, "Use Description:", "Jurisdiction:").Trim();
                    Jurisdiction    = gc.Between(propdet1, "Jurisdiction:", "Acreage:").Trim();
                    Acreage         = gc.Between(propdet1, "Acreage:", "Square Feet:").Trim();
                    Year_Built      = gc.Between(propdet1, "Year Built:", "Bedrooms:").Trim();

                    gc.CreatePdf(orderNumber, outparcelnowoh, "Assement", driver, "CA", "Santa Barbara");
                    property_Address = Street_Address + "~" + TRA + "~" + Transfer_TaxAmount + "~" + Use_Description + "~" + Jurisdiction + "~" + Acreage + "~" + Year_Built;
                    gc.insert_date(orderNumber, outparcelno, 221, property_Address, 1, DateTime.Now);

                    //Assessment Details
                    Land_MineralRights  = driver.FindElement(By.XPath("/html/body/form/table/tbody/tr[2]/td[2]/table/tbody/tr[2]/td/table/tbody/tr[2]/td[2]/table/tbody/tr[3]/td[2]/table/tbody/tr[5]/td/table/tbody/tr[6]/td/table/tbody/tr[2]/td[3]")).Text;
                    Improvements        = driver.FindElement(By.XPath("/html/body/form/table/tbody/tr[2]/td[2]/table/tbody/tr[2]/td/table/tbody/tr[2]/td[2]/table/tbody/tr[3]/td[2]/table/tbody/tr[5]/td/table/tbody/tr[6]/td/table/tbody/tr[4]/td[3]")).Text;
                    Personal_Property   = driver.FindElement(By.XPath("/html/body/form/table/tbody/tr[2]/td[2]/table/tbody/tr[2]/td/table/tbody/tr[2]/td[2]/table/tbody/tr[3]/td[2]/table/tbody/tr[5]/td/table/tbody/tr[6]/td/table/tbody/tr[6]/td[3]")).Text;
                    Home_OwnerExemption = driver.FindElement(By.XPath("/html/body/form/table/tbody/tr[2]/td[2]/table/tbody/tr[2]/td/table/tbody/tr[2]/td[2]/table/tbody/tr[3]/td[2]/table/tbody/tr[5]/td/table/tbody/tr[6]/td/table/tbody/tr[8]/td[3]")).Text;
                    Other_Exemption     = driver.FindElement(By.XPath("/html/body/form/table/tbody/tr[2]/td[2]/table/tbody/tr[2]/td/table/tbody/tr[2]/td[2]/table/tbody/tr[3]/td[2]/table/tbody/tr[5]/td/table/tbody/tr[6]/td/table/tbody/tr[10]/td[3]")).Text;
                    Net_AssessedValue   = driver.FindElement(By.XPath("/html/body/form/table/tbody/tr[2]/td[2]/table/tbody/tr[2]/td/table/tbody/tr[2]/td[2]/table/tbody/tr[3]/td[2]/table/tbody/tr[5]/td/table/tbody/tr[6]/td/table/tbody/tr[12]/td[3]")).Text;

                    assement_details = Land_MineralRights + "~" + Improvements + "~" + Personal_Property + "~" + Home_OwnerExemption + "~" + Other_Exemption + "~" + Net_AssessedValue;
                    gc.insert_date(orderNumber, outparcelno, 222, assement_details, 1, DateTime.Now);
                    AssessmentTime = DateTime.Now.ToString("HH:mm:ss");

                    //Download the pdf for Tax Details
                    String Parent_Window = driver.CurrentWindowHandle;
                    string cururl        = driver.Url;

                    //Value_Notice
                    IWebElement         ValueNotice = driver.FindElement(By.XPath("/html/body/form/table/tbody/tr[2]/td[2]/table/tbody/tr[2]/td/table/tbody/tr[2]/td[2]/table/tbody/tr[3]/td[2]/table/tbody/tr[5]/td/table/tbody/tr[2]/td/table/tbody/tr[2]/td[3]/table/tbody/tr/td[2]/span/strong/a"));
                    IJavaScriptExecutor js1         = driver as IJavaScriptExecutor;
                    js1.ExecuteScript("arguments[0].click();", ValueNotice);
                    Thread.Sleep(2000);
                    System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
                    driver.SwitchTo().Window(driver.WindowHandles.Last());
                    Thread.Sleep(2000);
                    gc.CreatePdf(orderNumber, outparcelnowoh, "Value_Tax.pdf", driver, "CA", "Santa Barbara");
                    // driver.SwitchTo().Window(Parent_Window);
                    driver.Navigate().GoToUrl(cururl);
                    Thread.Sleep(2000);

                    //Jurisdiction Details
                    try
                    {
                        taxUrl = driver.FindElement(By.XPath("//*[@id='lblAuditorLink']/a")).GetAttribute("href").ToString();

                        driver.Navigate().GoToUrl(taxUrl);


                        IWebElement         SelectOption = driver.FindElement(By.Id("Criteria#001"));
                        IList <IWebElement> Select       = SelectOption.FindElements(By.TagName("option"));
                        List <string>       option       = new List <string>();
                        string opt   = "";
                        int    Check = 0;
                        foreach (IWebElement Op in Select)
                        {
                            if (Check == 1)
                            {
                                //option.Add(Op.Text);
                                opt = Op.Text;
                                break;
                            }
                            Check++;
                        }
                        //foreach (string item in option)
                        //{
                        var SelectAddress    = driver.FindElement(By.Id("Criteria#001"));
                        var SelectAddressTax = new SelectElement(SelectAddress);
                        SelectAddressTax.SelectByText(opt);
                        driver.FindElement(By.Name("Submit")).Click();
                        Thread.Sleep(2000);
                        IWebElement         asstable = driver.FindElement(By.XPath("/html/body/table[5]/tbody/tr/td[2]/table[1]/tbody/tr[2]/td[2]/h1/table[1]/tbody"));
                        IList <IWebElement> asstr    = asstable.FindElements(By.TagName("tr"));
                        IList <IWebElement> asstd;
                        foreach (IWebElement tax in asstr)
                        {
                            asstd = tax.FindElements(By.TagName("td"));
                            if (asstd.Count != 0 && asstd.Count == 5 && tax.Text.Trim() != "" && !tax.Text.Contains("Parcel Number") || (tax.Text.Contains("Basic") || tax.Text.Contains("Total") || tax.Text.Contains("Fixed") || tax.Text.Contains("Situs")))
                            {
                                Taxrate_Area      = asstd[2].Text.Trim();
                                NetAssessed_Value = asstd[4].Text.Trim();
                            }
                        }



                        gc.CreatePdf(orderNumber, outparcelnowoh, "Property_Tax.pdf", driver, "CA", "Santa Barbara");
                        NoteTax = Taxrate_Area + "~" + NetAssessed_Value + "~" + "-" + "~" + "-";
                        gc.insert_date(orderNumber, outparcelno, 239, NoteTax, 1, DateTime.Now);
                        //}

                        IWebElement         TBTax = driver.FindElement(By.XPath("/html/body/table[5]/tbody/tr/td[2]/table[1]/tbody/tr[2]/td[2]/h1/table[2]/tbody"));
                        IList <IWebElement> TRTax = TBTax.FindElements(By.TagName("tr"));
                        IList <IWebElement> TDTax;

                        foreach (IWebElement tax in TRTax)
                        {
                            TDTax = tax.FindElements(By.TagName("td"));
                            if (TDTax.Count != 0 && TDTax.Count != 1 && tax.Text.Trim() != "" && !tax.Text.Contains("Fund") || (tax.Text.Contains("Basic") || tax.Text.Contains("Total") || tax.Text.Contains("Fixed") || tax.Text.Contains("Bonds") || tax.Text.Contains("9801 - County School Srvc Fund")))
                            {
                                try
                                {
                                    Fund   = TDTax[0].Text;
                                    Amount = TDTax[2].Text;
                                }
                                catch { Amount = "-"; }

                                proprtyTax = "-" + "~" + "-" + "~" + Fund + "~" + Amount;
                                gc.insert_date(orderNumber, parcelNumber, 239, proprtyTax, 1, DateTime.Now);
                            }
                        }
                    }
                    catch { }

                    driver.Navigate().GoToUrl("https://Mytaxes.sbtaxes.org/WebPages/Assistance_ContactUs.aspx");
                    Thread.Sleep(2000);
                    gc.CreatePdf(orderNumber, outparcelnowoh, "Current_Authority.pdf", driver, "CA", "Santa Barbara");
                    Tax_Authority = driver.FindElement(By.XPath("//*[@id='ctl00_PageContentBody_ASPxPageControl1_C0']/div/div[1]/div[2]/div/h4")).Text + " " + driver.FindElement(By.XPath("/html/body/form/div[3]/div[2]/div[2]/div/div/div[2]/div[1]/div/div[1]/div/div[1]/div[2]/div/ul")).Text;

                    //Tax Information

                    driver.Navigate().GoToUrl("http://www.countyofsb.org/ttcpapg/index.aspx");
                    Thread.Sleep(2000);

                    try
                    {
                        IWebElement         TaxInfo = driver.FindElement(By.XPath("/html/body/form/div[3]/div[2]/div[2]/div[2]/div/a"));
                        IJavaScriptExecutor TI      = driver as IJavaScriptExecutor;
                        TI.ExecuteScript("arguments[0].click();", TaxInfo);
                        Thread.Sleep(2000);

                        WebDriverWait wait    = new WebDriverWait(driver, TimeSpan.FromSeconds(10));
                        var           element = wait.Until(ExpectedConditions.ElementIsVisible(By.XPath("/html/body/form/div[3]/div[1]/div[2]/div[2]/div[1]/table/tbody/tr/td[2]")));
                        Actions       action  = new Actions(driver);
                        action.MoveToElement(element).Perform();
                        Thread.Sleep(2000);

                        driver.FindElement(By.XPath("/html/body/form/div[3]/div[1]/div[2]/div[2]/div[1]/table/tbody/tr/td[2]/div/div[2]/div/ul/li[1]/div/span")).Click();
                        Thread.Sleep(2000);
                        driver.FindElement(By.Id("ctl00_ASPxCallbackPanel1_combo_Search_I")).SendKeys(outparcelno);
                        gc.CreatePdf(orderNumber, outparcelnowoh, "City_Info.pdf", driver, "CA", "Santa Barbara");
                        driver.FindElement(By.Id("ctl00_ASPxCallbackPanel1_btn_Search")).Click();
                        Thread.Sleep(2000);
                        gc.CreatePdf(orderNumber, outparcelnowoh, "City_Info_tax.pdf", driver, "CA", "Santa Barbara");
                        //Tax Bill

                        //Download the pdf for Tax Details
                        //String Parent_Window1 = driver.CurrentWindowHandle;

                        //IWebElement taxbill = driver.FindElement(By.XPath("//*[@id='ctl00_PageContentBody_tabControl_Propertys_gridView_BillDetail_cell1_0_BillMenu_DXI0_T']"));
                        //IJavaScriptExecutor TB = driver as IJavaScriptExecutor;
                        //TB.ExecuteScript("arguments[0].click();", taxbill);
                        //Thread.Sleep(2000);

                        //System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
                        //driver.SwitchTo().Window(driver.WindowHandles.Last());
                        //Thread.Sleep(4000);
                        //gc.CreatePdf_Chrome(orderNumber, outparcelno, "Tax_Bill.pdf", driver, "CA", "Santa Barbara");
                        //driver.SwitchTo().Window(Parent_Window1);
                        //Thread.Sleep(2000);
                    }
                    catch
                    { }

                    try
                    {
                        //Current Tax Details
                        Property_Type = driver.FindElement(By.XPath("/html/body/form/div[3]/div[2]/div[2]/div/table/tbody/tr/td/table/tbody/tr[2]/td[2]")).Text;
                        try
                        {
                            Current_PropertyAddress = driver.FindElement(By.Id("ctl00_PageContentBody_gridView_Propertys_cell0_2_ASPxSitusAddressLine1")).Text + " " + driver.FindElement(By.Id("ctl00_PageContentBody_gridView_Propertys_cell0_2_ASPxSitusAddressLine2")).Text;
                        }
                        catch { }
                        Property_Remarks = driver.FindElement(By.XPath("/html/body/form/div[3]/div[2]/div[2]/div/table/tbody/tr/td/table/tbody/tr[2]/td[4]")).Text;
                        TotalDue         = driver.FindElement(By.XPath("/html/body/form/div[3]/div[2]/div[2]/div/table/tbody/tr/td/table/tbody/tr[2]/td[6]")).Text;
                        gc.CreatePdf(orderNumber, outparcelnowoh, "Current_Tax.pdf", driver, "CA", "Santa Barbara");
                        Bill_Tax1 = Property_Type + "~" + Current_PropertyAddress + "~" + Property_Remarks + "~" + TotalDue + "~" + "-" + "~" + "-" + "~" + "-" + "~" + "-" + "~" + "-" + "~" + "-" + "~" + "-";
                        gc.insert_date(orderNumber, outparcelno, 242, Bill_Tax1, 1, DateTime.Now);

                        IWebElement         TBCurrnetTax = driver.FindElement(By.XPath("/html/body/form/div[3]/div[2]/div[2]/div/div[2]/div/div[1]/div/table/tbody/tr/td/table[2]/tbody"));
                        IList <IWebElement> TRCurrnetTax = TBCurrnetTax.FindElements(By.TagName("tr"));
                        IList <IWebElement> TDCurrnetTax;
                        int i = 3;
                        foreach (IWebElement CurrentTax in TRCurrnetTax)
                        {
                            TDCurrnetTax = CurrentTax.FindElements(By.TagName("td"));
                            if (TDCurrnetTax.Count != 0 && !CurrentTax.Text.Contains("Bill Menu") && !CurrentTax.Text.Contains("Paid Bills") && !CurrentTax.Text.Contains("Date") && !CurrentTax.Text.Contains("Year") && !CurrentTax.Text.Contains("Property Address") && !CurrentTax.Text.Contains("First Installment") && !CurrentTax.Text.Contains("Second Installment") && CurrentTax.Text.Trim() != "")
                            {
                                Bill_No = driver.FindElement(By.XPath("/html/body/form/div[3]/div[2]/div[2]/div/div[2]/div/div[1]/div/table/tbody/tr/td/table[2]/tbody/tr[" + i + "]/td[2]/div")).Text;
                                if (Bill_No.Contains("\r\n"))
                                {
                                    Bill_No = Bill_No.Replace("\r\n", " ");
                                }
                                Bill_Date              = TDCurrnetTax[2].Text;
                                Bill_Year              = TDCurrnetTax[3].Text;
                                Bill_PropertyAddress   = TDCurrnetTax[4].Text;
                                Bill_FirstInstallment  = TDCurrnetTax[5].Text;
                                Bill_SecondInstallment = TDCurrnetTax[6].Text;

                                Bill_Tax = "-" + "~" + "-" + "~" + "-" + "~" + "-" + "~" + Bill_No + "~" + Bill_Date + "~" + Bill_Year + "~" + Bill_PropertyAddress + "~" + Bill_FirstInstallment + "~" + Bill_SecondInstallment + "~" + "-";
                                gc.insert_date(orderNumber, outparcelno, 242, Bill_Tax, 1, DateTime.Now);
                                i++;
                            }
                        }

                        try
                        {
                            IWebElement Ilink   = driver.FindElement(By.Id("ctl00_PageContentBody_tabControl_Propertys_gridView_BillDetail_cell1_0_BillMenu_DXI0_T"));
                            string      strLink = "https://mytaxes.sbtaxes.org/WebPages/" + gc.Between(Ilink.GetAttribute("href"), "javascript: PopUpCenter('", "||");
                            gc.downloadfile(strLink, orderNumber, outparcelnowoh, "TaxBill.pdf", "CA", "Santa Barbara");
                        }
                        catch { }


                        // driver.Navigate().Back();
                        // Thread.Sleep(2000);
                    }
                    catch
                    { }
                    try
                    {
                        Taxauthority = "-" + "~" + "-" + "~" + "-" + "~" + "-" + "~" + "-" + "~" + "-" + "~" + "-" + "~" + "-" + "~" + "-" + "~" + "-" + "~" + Tax_Authority;
                        gc.insert_date(orderNumber, outparcelnowoh, 242, Taxauthority, 1, DateTime.Now);
                    }
                    catch { }

                    try
                    {
                        //Taxes and Values Details
                        string              Ok        = "";
                        IWebElement         Tax_Value = driver.FindElement(By.XPath("//*[@id='ctl00_PageContentBody_tabControl_Propertys_T1T']"));
                        IJavaScriptExecutor TV        = driver as IJavaScriptExecutor;
                        TV.ExecuteScript("arguments[0].click();", Tax_Value);
                        Thread.Sleep(2000);

                        List <string>       List1             = new List <string>();
                        List <string>       List2             = new List <string>();
                        List <string>       List3             = new List <string>();
                        List <string>       List4             = new List <string>();
                        int                 K                 = 0;
                        IWebElement         valuetableElement = driver.FindElement(By.XPath("/html/body/form/div[3]/div[2]/div[2]/div/div[2]/div/div[2]/div/div/table/tbody/tr/td/div[1]/table/tbody"));
                        IList <IWebElement> valuetableRow     = valuetableElement.FindElements(By.TagName("tr"));
                        IList <IWebElement> valuerowTD;
                        gc.CreatePdf(orderNumber, outparcelnowoh, "Current_Value.pdf", driver, "CA", "Santa Barbara");
                        foreach (IWebElement row in valuetableRow)
                        {
                            valuerowTD = row.FindElements(By.TagName("td"));
                            if (valuerowTD.Count != 0 && valuerowTD.Count != 1 && Ok == "OK")
                            {
                                if (valuerowTD.Count == 2)
                                {
                                    if (valuerowTD[0].Text.Trim() != "")
                                    {
                                        string Taxnumber = valuerowTD[0].Text;
                                        List4.Add(Taxnumber);
                                    }
                                }
                                else
                                {
                                    if (valuerowTD[1].Text.Trim() != "" && valuerowTD[2].Text.Trim() != "" && valuerowTD[3].Text.Trim() != "")
                                    {
                                        string Value1 = valuerowTD[1].Text;
                                        List1.Add(Value1);
                                        string Value2 = valuerowTD[2].Text;
                                        List2.Add(Value2);
                                        string Value3 = valuerowTD[3].Text;
                                        List3.Add(Value3);
                                    }
                                }
                            }
                            if (valuerowTD.Count != 0 && valuerowTD.Count != 1)
                            {
                                if (valuerowTD[0].Text.Contains("Tax Bills"))
                                {
                                    if (K == 1)
                                    {
                                        Ok = "OK";
                                    }
                                    K++;
                                }
                            }
                        }

                        Tax_Bills = List4[0] + "~" + List4[1] + "~" + List4[2];

                        Frow1 = List4[0] + "~" + List1[0] + "~" + List2[0] + "~" + List3[0];
                        Row1  = "";
                        for (int X = List1.Count - 1; X >= 0; X--)
                        {
                            Row1 = List1[X] + "~" + Row1;
                        }
                        Row1 = List4[0] + "~" + Row1 + "Wer";
                        Row1 = Row1.Replace("~Wer", "");
                        gc.insert_date(orderNumber, outparcelno, 259, Row1, 1, DateTime.Now);

                        Frow2 = List4[0] + "~" + List1[0] + "~" + List2[0] + "~" + List3[0];
                        Row2  = "";
                        for (int X = List2.Count - 1; X >= 0; X--)
                        {
                            Row2 = List2[X] + "~" + Row2;
                        }
                        Row2 = List4[1] + "~" + Row2 + "Wer";
                        Row2 = Row2.Replace("~Wer", "");
                        gc.insert_date(orderNumber, outparcelno, 259, Row2, 1, DateTime.Now);

                        Frow3 = List4[0] + "~" + List1[0] + "~" + List2[0] + "~" + List3[0];
                        Row3  = "";
                        for (int X = List3.Count - 1; X >= 0; X--)
                        {
                            Row3 = List3[X] + "~" + Row3;
                        }
                        Row3 = List4[2] + "~" + Row3 + "Wer";
                        Row3 = Row3.Replace("~Wer", "");
                        gc.insert_date(orderNumber, outparcelno, 259, Row3, 1, DateTime.Now);
                    }
                    catch
                    { }

                    //Tax Payment Receipts
                    try
                    {
                        try
                        {
                            Tax_Receipt = driver.FindElement(By.XPath("//*[@id='ctl00_PageContentBody_tabControl_Propertys_T2T']"));
                        }
                        catch { }
                        gc.CreatePdf(orderNumber, outparcelnowoh, "Current_Payment.pdf", driver, "CA", "Santa Barbara");
                        IJavaScriptExecutor TR = driver as IJavaScriptExecutor;
                        TR.ExecuteScript("arguments[0].click();", Tax_Receipt);
                        Thread.Sleep(2000);


                        int                 i             = 0;
                        IWebElement         TBTaxReceipts = driver.FindElement(By.XPath("/html/body/form/div[3]/div[2]/div[2]/div/div[2]/div/div[3]/div/table/tbody/tr/td/table[2]/tbody"));
                        IList <IWebElement> TRTaxReceipts = TBTaxReceipts.FindElements(By.TagName("tr"));
                        IList <IWebElement> TDTaxReceipts;
                        gc.CreatePdf(orderNumber, outparcelno, "Current_Payment.pdf", driver, "CA", "Santa Barbara");
                        foreach (IWebElement TaxReceipt in TRTaxReceipts)
                        {
                            TDTaxReceipts = TaxReceipt.FindElements(By.TagName("td"));
                            if (TDTaxReceipts.Count == 9)
                            {
                                Payment_Date          = TDTaxReceipts[0].Text;
                                Effective_PaymentDate = TDTaxReceipts[1].Text;
                                BillNumber            = TDTaxReceipts[2].Text;
                                Year           = TDTaxReceipts[3].Text;
                                TaxBill_Type   = TDTaxReceipts[4].Text;
                                Installment    = TDTaxReceipts[5].Text;
                                Payment_Batch  = TDTaxReceipts[6].Text;
                                Payment_Type   = TDTaxReceipts[7].Text;
                                Payment_Amount = TDTaxReceipts[8].Text;

                                Tax_Receipts = Payment_Date + "~" + Effective_PaymentDate + "~" + BillNumber + "~" + Year + "~" + TaxBill_Type + "~" + Installment + "~" + Payment_Batch + "~" + Payment_Type + "~" + Payment_Amount;
                                gc.insert_date(orderNumber, outparcelno, 244, Tax_Receipts, 1, DateTime.Now);
                                i++;
                            }
                        }
                    }
                    catch
                    { }
                    TaxTime = DateTime.Now.ToString("HH:mm:ss");

                    LastEndTime = DateTime.Now.ToString("HH:mm:ss");
                    gc.insert_TakenTime(orderNumber, "CA", "Santa Barbara", StartTime, AssessmentTime, TaxTime, CitytaxTime, LastEndTime);

                    driver.Quit();
                    //megrge pdf files
                    gc.mergpdf(orderNumber, "CA", "Santa Barbara");
                    return("Data Inserted Successfully");
                }
                catch (Exception ex)
                {
                    driver.Quit();
                    throw ex;
                }
            }
        }
예제 #24
0
    IEnumerator ApplyPositions()
    {
        yield return(new WaitUntil(() => GameManager.k_Manager.CharactersUp));

        yield return(new WaitUntil(() => GameManager.k_Manager.EnemiesUp));

        foreach (Transform tp_spawn in transform)
        {
            if (tp_spawn.name == "SpawnPoint" && tp_spawn.transform.FindChild("Character(Clone)") != null)
            {
                while (true)
                {
                    if (Column1.Contains(tp_spawn))
                    {
                        SetPosition(tp_spawn, 1, true);
                        break;
                    }
                    if (Column2.Contains(tp_spawn))
                    {
                        SetPosition(tp_spawn, 2, true);
                        break;
                    }
                    if (Column3.Contains(tp_spawn))
                    {
                        SetPosition(tp_spawn, 3, true);
                        break;
                    }
                    if (Column4.Contains(tp_spawn))
                    {
                        SetPosition(tp_spawn, 4, true);
                        break;
                    }
                }
                while (true)
                {
                    if (Row1.Contains(tp_spawn))
                    {
                        SetPosition(tp_spawn, 1, false);
                        break;
                    }
                    if (Row2.Contains(tp_spawn))
                    {
                        SetPosition(tp_spawn, 2, false);
                        break;
                    }
                    if (Row3.Contains(tp_spawn))
                    {
                        SetPosition(tp_spawn, 3, false);
                        break;
                    }
                    if (Row4.Contains(tp_spawn))
                    {
                        SetPosition(tp_spawn, 4, false);
                        break;
                    }
                }

                ApplyPositionToCharacter(tp_spawn.transform.FindChild("Character(Clone)").GetComponent <CharacterClass> ());
            }
        }

        GameManager.k_Manager.Applied = true;
    }
예제 #25
0
        private void CheckWinner()
        {
            int Row1, Row2, Row3;
            int Column1, Column2, Column3;
            int Diagonal1, Diagonal2;

            Row1 = GameArrayGrid[0] + GameArrayGrid[1] + GameArrayGrid[2];
            Row2 = GameArrayGrid[3] + GameArrayGrid[4] + GameArrayGrid[5];
            Row3 = GameArrayGrid[6] + GameArrayGrid[7] + GameArrayGrid[8];

            Column1 = GameArrayGrid[0] + GameArrayGrid[3] + GameArrayGrid[6];
            Column2 = GameArrayGrid[1] + GameArrayGrid[4] + GameArrayGrid[7];
            Column3 = GameArrayGrid[2] + GameArrayGrid[5] + GameArrayGrid[8];

            Diagonal1 = GameArrayGrid[0] + GameArrayGrid[4] + GameArrayGrid[8];
            Diagonal2 = GameArrayGrid[2] + GameArrayGrid[4] + GameArrayGrid[6];

            Console.WriteLine("Row 1: " + Row1 + "\n" +
                              "Row 2: " + Row2 + "\n" +
                              "Row 3: " + Row3 + "\n" +
                              "Column 1: " + Column1 + "\n" +
                              "Column 2: " + Column2 + "\n" +
                              "Column 3: " + Column3 + "\n" +
                              "Diagonal 1: " + Diagonal1 + "\n" +
                              "Diagonal 2: " + Diagonal2 + "\n");

            if (Row1.Equals(3) || Row2.Equals(3) || Row3.Equals(3)) // CHECK FOR ROW WIN FOR O
            {
                label_WinnerText.Visible = true;
                label_WinnerText.Text    = "Winner: Player O";
                disableButtons();
            }
            else if (Row1.Equals(-3) || Row2.Equals(-3) || Row3.Equals(-3)) //CHECK FOR ROW WIN FOR X
            {
                label_WinnerText.Visible = true;
                label_WinnerText.Text    = "Winner: Player X";
                disableButtons();
            }
            else if (Column1.Equals(3) || Column2.Equals(3) || Column3.Equals(3))
            {
                label_WinnerText.Visible = true;
                label_WinnerText.Text    = "Winner: Player O";
                disableButtons();
            }
            else if (Column1.Equals(-3) || Column2.Equals(-3) || Column3.Equals(-3))
            {
                label_WinnerText.Visible = true;
                label_WinnerText.Text    = "Winner: Player X";
                disableButtons();
            }
            else if (Diagonal1.Equals(3) || Diagonal2.Equals(3))
            {
                label_WinnerText.Visible = true;
                label_WinnerText.Text    = "Winner: Player O";
                disableButtons();
            }
            else if (Diagonal1.Equals(-3) || Diagonal2.Equals(-3))
            {
                label_WinnerText.Visible = true;
                label_WinnerText.Text    = "Winner: Player X";
                disableButtons();
            }
            else if (isBoardFull())
            {
                label_WinnerText.Visible = true;
                label_WinnerText.Text    = "It's a Draw!";
                disableButtons();
            }
        }
예제 #26
0
 /// <summary>
 /// Returns the hashcode for the object.
 /// </summary>
 public override int GetHashCode()
 {
     return(GeometRi3D.HashFunction(Row1.GetHashCode(), Row2.GetHashCode(), Row3.GetHashCode()));
 }
예제 #27
0
파일: Mat4.cs 프로젝트: opeyx/Dolhouse
 /// <summary>
 /// Return the Mat4 as a string.
 /// </summary>
 /// <returns>The Mat4 formatted as a string.</returns>
 public override string ToString()
 {
     return("(" + Row1.ToString() + ", " + Row2.ToString() + ", " + Row3.ToString() + ", " + Row4.ToString() + ")");
 }
예제 #28
0
 public override string ToString()
 {
     return(Row0.ToString() + "\n" + Row1.ToString() + "\n" + Row2.ToString() + "\n" + Row3.ToString());
 }
예제 #29
0
        public List <ClsServiceDetails> GetServiceDetails(Int64 Ref_Service_ID, string AliasName)
        {
            try
            {
                DBParameterCollection ObJParameterCOl = new DBParameterCollection();
                DBParameter           objDBParameter  = new DBParameter("@Ref_Service_ID", Ref_Service_ID, DbType.Int64);
                ObJParameterCOl.Add(objDBParameter);
                objDBParameter = new DBParameter("@AliasName", AliasName, DbType.String);
                ObJParameterCOl.Add(objDBParameter);

                DBHelper objDbHelper = new DBHelper();
                DataSet  ds          = objDbHelper.ExecuteDataSet(Constant.GetServiceDetails, ObJParameterCOl, CommandType.StoredProcedure);
                List <ClsServiceDetails> objServiceList = new List <ClsServiceDetails>();

                if (ds != null)
                {
                    if (ds.Tables[0].Rows.Count > 0)
                    {
                        objServiceList = ds.Tables[0].AsEnumerable().Select(Row =>
                                                                            new ClsServiceDetails
                        {
                            Ref_Service_ID        = Row.Field <Int64>("Ref_Service_ID"),
                            Ref_Category_ID       = Row.Field <Int64>("Ref_Category_ID"),
                            ServiceTitle          = Row.Field <string>("ServiceTitle"),
                            AliasName             = Row.Field <string>("AliasName"),
                            Description           = Row.Field <string>("Description"),
                            Price                 = Row.Field <decimal>("Price"),
                            PriceWithProjectFiles = Row.Field <decimal>("PriceWithProjectFiles"),
                            Revision              = Row.Field <int>("Revision"),
                            DeliveryDate          = Row.Field <string>("DeliveryDate"),
                            IsActive              = Row.Field <Boolean>("IsActive"),
                            IsDeleted             = Row.Field <Boolean>("IsDeleted"),
                            CreatedBy             = Row.Field <Int64>("CreatedBy"),
                            CreatedName           = Row.Field <string>("CreatedName"),
                            CreatedDateTime       = Row.Field <DateTime?>("CreatedDateTime"),
                            MetaTitle             = Row.Field <string>("MetaTitle"),
                            MetaKeywords          = Row.Field <string>("MetaKeywords"),
                            MetaDescription       = Row.Field <string>("MetaDescription"),
                            FAQDetails            = ds.Tables[1].AsEnumerable().Where(x => x.Field <Int64>("Ref_Service_ID") == Row.Field <Int64>("Ref_Service_ID")).Select(Row1 =>
                                                                                                                                                                            new ClsFAQDetails
                            {
                                Ref_Service_ID = Row1.Field <Int64>("Ref_Service_ID"),
                                Questions      = Row1.Field <string>("Question"),
                                Answer         = Row1.Field <string>("Answer")
                            }).ToList(),
                            FileManager = ds.Tables[2].AsEnumerable().Where(x => x.Field <Int64>("ModuleID") == Row.Field <Int64>("Ref_Service_ID")).Select(Row2 =>
                                                                                                                                                            new ClsFileManager
                            {
                                FileManagerID  = Row2.Field <Int64>("Ref_FileManager_ID"),
                                FileIdentifier = Row2.Field <string>("FileIdentifier"),
                                FileName       = Row2.Field <string>("FileName"),
                                FilePath       = Row2.Field <string>("FilePath"),
                                FileExtension  = Row2.Field <string>("FileExtension"),
                                FileSize       = Row2.Field <Int64>("FileSize"),
                                FileType       = Row2.Field <string>("FileType"),
                                Sequence       = Row2.Field <int>("Sequence"),
                            }).ToList(),
                        }).ToList();
                    }
                }
                return(objServiceList);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
예제 #30
0
        public List <ClsTrackAndBeatDetails> GetTrackAndBeatDetails(Int64 UserID, Int64 TrackID)
        {
            try
            {
                DBParameterCollection ObJParameterCOl = new DBParameterCollection();
                DBParameter           objDBParameter  = new DBParameter("@UserID", UserID, DbType.Int64);
                ObJParameterCOl.Add(objDBParameter);
                objDBParameter = new DBParameter("@TrackID", TrackID, DbType.Int64);
                ObJParameterCOl.Add(objDBParameter);

                DBHelper objDbHelper = new DBHelper();
                DataSet  Ds          = objDbHelper.ExecuteDataSet(Constant.GetTrackAndBeatDetails, ObJParameterCOl, CommandType.StoredProcedure);

                List <ClsTrackAndBeatDetails> objTrackAndBeatDetails = new List <ClsTrackAndBeatDetails>();

                if (Ds != null)
                {
                    if (Ds.Tables.Count > 0)
                    {
                        if (Ds.Tables[0].Rows.Count > 0)
                        {
                            IList <ClsTrackAndBeatDetails> List = Ds.Tables[0].AsEnumerable().Select(Row =>
                                                                                                     new ClsTrackAndBeatDetails
                            {
                                Ref_Track_ID          = Row.Field <Int64>("Ref_Track_ID"),
                                CategoryName          = Row.Field <string>("CategoryName"),
                                TrackName             = Row.Field <string>("TrackName"),
                                TrackType             = Row.Field <string>("TrackType"),
                                Bio                   = Row.Field <string>("Bio"),
                                Mood                  = Row.Field <string>("Mood"),
                                Key                   = Row.Field <string>("TrackKey"),
                                Tag                   = Row.Field <string>("Tag"),
                                Duration              = Row.Field <string>("Duration"),
                                Price                 = Row.Field <decimal>("Price"),
                                PriceWithProjectFiles = Row.Field <decimal>("PriceWithProjectFiles"),
                                BMP                   = Row.Field <int>("BMP"),
                                DAW                   = Row.Field <string>("DAW"),
                                IsVocals              = Row.Field <string>("IsVocals"),
                                IsTrack               = Row.Field <string>("IsTrack"),
                                Favourite             = Row.Field <string>("Favourite"),
                                SoldOut               = Row.Field <string>("SoldOut"),
                                FileManager           = Ds.Tables[1].AsEnumerable().Where(x => x.Field <Int64>("ModuleID") == Row.Field <Int64>("Ref_Track_ID")).Select(Row1 =>
                                                                                                                                                                        new ClsFileManager
                                {
                                    FileManagerID  = Row1.Field <Int64>("Ref_FileManager_ID"),
                                    FileIdentifier = Row1.Field <string>("FileIdentifier"),
                                    FileName       = Row1.Field <string>("FileName"),
                                    FilePath       = Row1.Field <string>("FilePath"),
                                    FileExtension  = Row1.Field <string>("FileExtension"),
                                    FileSize       = Row1.Field <Int64>("FileSize"),
                                    FileType       = Row1.Field <string>("FileType"),
                                    Sequence       = Row1.Field <int>("Sequence"),
                                }).ToList(),
                                RelatedTrack = Ds.Tables[2].AsEnumerable().Select(Row2 =>
                                                                                  new ClsRelatedTrackList
                                {
                                    Ref_Track_ID      = Row2.Field <Int64>("Ref_Track_ID"),
                                    CategoryName      = Row2.Field <string>("CategoryName"),
                                    TrackName         = Row2.Field <string>("TrackName"),
                                    Bio               = Row2.Field <string>("Bio"),
                                    Price             = Row2.Field <decimal>("Price"),
                                    IsTrack           = Row2.Field <string>("IsTrack"),
                                    PlayUrl           = Row2.Field <string>("PlayUrl"),
                                    Favourite         = Row2.Field <string>("Favourite"),
                                    SoldOut           = Row2.Field <string>("SoldOut"),
                                    ThumbnailImageUrl = Row2.Field <string>("Thumbnail"),
                                }).ToList(),
                            }).ToList();
                            objTrackAndBeatDetails.AddRange(List);
                        }
                    }
                }
                return(objTrackAndBeatDetails);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        public List <ClsTrackDetails> GetTrackDetails(Int64 TrackID)
        {
            try
            {
                DBParameterCollection ObJParameterCOl = new DBParameterCollection();
                DBParameter           objDBParameter  = new DBParameter("@TrackID", TrackID, DbType.Int64);
                ObJParameterCOl.Add(objDBParameter);

                DBHelper objDbHelper = new DBHelper();
                DataSet  ds          = objDbHelper.ExecuteDataSet(Constant.GetTrackDetails, ObJParameterCOl, CommandType.StoredProcedure);
                List <ClsTrackDetails> objUserMasterData = new List <ClsTrackDetails>();

                if (ds != null)
                {
                    if (ds.Tables[0].Rows.Count > 0)
                    {
                        IList <ClsTrackDetails> List = ds.Tables[0].AsEnumerable().Select(Row =>
                                                                                          new ClsTrackDetails
                        {
                            Ref_Track_ID          = Row.Field <Int64>("Ref_Track_ID"),
                            Ref_Category_ID       = Row.Field <Int64>("Ref_Category_ID"),
                            TrackName             = Row.Field <string>("TrackName"),
                            TrackType             = Row.Field <string>("TrackType"),
                            Bio                   = Row.Field <string>("Bio"),
                            Mood                  = Row.Field <string>("Mood"),
                            Key                   = Row.Field <string>("TrackKey"),
                            Tag                   = Row.Field <string>("Tag"),
                            Duration              = Row.Field <string>("Duration"),
                            Price                 = Row.Field <decimal>("Price"),
                            PriceWithProjectFiles = Row.Field <decimal>("PriceWithProjectFiles"),
                            BMP                   = Row.Field <int>("BMP"),
                            DAW                   = Row.Field <string>("DAW"),
                            TrackStatus           = Row.Field <string>("TrackStatus"),
                            Reason                = Row.Field <string>("Reason"),
                            IsVocals              = Row.Field <Boolean>("IsVocals"),
                            IsTrack               = Row.Field <Boolean>("IsTrack"),
                            IsActive              = Row.Field <Boolean>("IsActive"),
                            CreatedBy             = Row.Field <String>("CreatedBy"),
                            FileManager           = ds.Tables[1].AsEnumerable().Where(x => x.Field <Int64>("ModuleID") == Row.Field <Int64>("Ref_Track_ID")).Select(Row1 =>
                                                                                                                                                                    new ClsFileManager
                            {
                                FileManagerID  = Row1.Field <Int64>("Ref_FileManager_ID"),
                                FileIdentifier = Row1.Field <string>("FileIdentifier"),
                                FileName       = Row1.Field <string>("FileName"),
                                FilePath       = Row1.Field <string>("FilePath"),
                                FileExtension  = Row1.Field <string>("FileExtension"),
                                FileSize       = Row1.Field <Int64>("FileSize"),
                                FileType       = Row1.Field <string>("FileType"),
                                Sequence       = Row1.Field <int>("Sequence"),
                            }).ToList(),
                        }).ToList();
                        objUserMasterData.AddRange(List);
                    }
                }
                return(objUserMasterData);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }