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);
        }
예제 #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;
        }
예제 #3
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");
     }
 }
예제 #4
0
        //--------------------------------------------------------------------------------------------------------------------------------------
        /// <summary>Se llama cuando se oprime el botón de borrar una venta</summary>
        private void btnDelVenta_Click(object sender, EventArgs e)
        {
            var ret = MessageBox.Show("Si borra la venta, no quedrá constancia en el sistema\r\n¿Estas seguro?", "Aviso", MessageBoxButtons.YesNo);

            if (ret == DialogResult.Yes)
            {
                var Row1 = Datos.BD.Ventas.FindByid(NowVentId);
                if (Row1 == null)
                {
                    MessageBox.Show("No se encontro el item a borrar");
                    return;
                }

                Row1.Delete();

                foreach (DataRow Row2 in tbVentas.Rows)
                {
                    if ((int)Row2[0] == NowVentId)
                    {
                        Row2.Delete();
                        break;
                    }
                }

                SetWorkMode(0);
                RefreshEstadisticas();
                Datos.SetChanges("VentaDelete");
            }
        }
예제 #5
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)));
 }
예제 #6
0
        private static void CreateRowHeadings(Table2 table)
        {
            Row2 row = table.Rows.Add(40, Font.TimesBold, 12, RgbColor.Black, RgbColor.LightGrey);

            row.CellDefault.Align  = TextAlign.Center;
            row.CellDefault.VAlign = VAlign.Top;
            row.Cells.Add("FormField Name");
            row.Cells.Add("FormField Type");
            row.Cells.Add("FormField Value");
        }
예제 #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;
            }
        }
        public static void CreateDaysOfWeekHeader(Table2 table)
        {
            Row2 row = table.Rows.Add(20, Font.Helvetica, 12);

            row.Cells.Add(DayOfWeek.Sunday.ToString(), Font.HelveticaBold, 12, RgbColor.Red, RgbColor.AliceBlue, 1);
            row.Cells.Add(DayOfWeek.Monday.ToString());
            row.Cells.Add(DayOfWeek.Tuesday.ToString());
            row.Cells.Add(DayOfWeek.Wednesday.ToString());
            row.Cells.Add(DayOfWeek.Thursday.ToString());
            row.Cells.Add(DayOfWeek.Friday.ToString());
            row.Cells.Add(DayOfWeek.Saturday.ToString());
        }
예제 #9
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);
        }
예제 #10
0
        public List <ClsTicketDetails> GetUserTicketList(Int64 UserID = 0, int StartCount = 0, int EndCount = 0)
        {
            try
            {
                DBParameterCollection ObJParameterCOl = new DBParameterCollection();
                DBParameter           objDBParameter  = new DBParameter("@UserID", UserID, DbType.Int64);
                ObJParameterCOl.Add(objDBParameter);
                objDBParameter = new DBParameter("@StartCount", StartCount, DbType.Int32);
                ObJParameterCOl.Add(objDBParameter);
                objDBParameter = new DBParameter("@EndCount", EndCount, DbType.Int32);
                ObJParameterCOl.Add(objDBParameter);

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

                List <ClsTicketDetails> objUserDetails = new List <ClsTicketDetails>();

                if (ds != null)
                {
                    if (ds.Tables[0].Rows.Count > 0)
                    {
                        objUserDetails = ds.Tables[0].AsEnumerable().Select(Row =>
                                                                            new ClsTicketDetails
                        {
                            Ref_Ticket_ID     = Row.Field <Int64>("Ref_User_ID"),
                            Ref_TicketType_ID = Row.Field <Int64>("Ref_TicketType_ID"),
                            Ref_User_ID       = Row.Field <Int64>("Ref_User_ID"),
                            Subject           = Row.Field <string>("Subject"),
                            Description       = Row.Field <string>("Description"),
                            FileManager       = ds.Tables[1].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();
                    }
                }
                return(objUserDetails);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
예제 #11
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);
            }
        }
예제 #12
0
 private static void CreateList(Table2 table, PdfFormFieldList fieldList)
 {
     for (int i = 0; i < fieldList.Count; i++)
     {
         Row2 row = table.Rows.Add(20);
         row.Cells.Add(fieldList[i].FullName);
         row.Cells.Add(GetFieldType(fieldList[i]));
         row.Cells.Add(fieldList[i].GetValue());
         if (fieldList[i].HasChildFields == true)
         {
             CreateList(table, fieldList[i].ChildFields);
         }
     }
 }
예제 #13
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();
            }
        }
        public static void CreateRow(Table2 table, TableReportData.Table data)
        {
            Row2 row = table.Rows.Add(20);

            row.Cells.Add(data.ID.ToString(), Font.Helvetica, 12, RgbColor.Black, RgbColor.LightGrey, 1);
            row.Cells.Add(data.ProductName);
            row.Cells.Add(data.SupplierID.ToString());
            row.Cells.Add(data.CategoryID.ToString());
            row.Cells.Add(data.QuantityPerUnit);
            row.Cells.Add(data.UnitPrice.ToString("$0.00"));
            row.Cells.Add(data.UnitInStock.ToString());
            row.Cells.Add(data.UnitsOnOrder.ToString());
            row.Cells.Add(data.ReorderLevel.ToString());
            row.Cells.Add(data.Discontinued.ToString());
        }
예제 #15
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);
예제 #16
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);
            }
        }
    }
        public static void CreateRowHeadings(Table2 table)
        {
            Row2 row = table.Rows.Add(40, Font.TimesBold, 12, RgbColor.Black, RgbColor.LightGrey);

            row.CellDefault.Align  = TextAlign.Center;
            row.CellDefault.VAlign = VAlign.Top;
            row.Cells.Add("ID");
            row.Cells.Add("Product Name");
            row.Cells.Add("Supplier ID");
            row.Cells.Add("Category ID");
            row.Cells.Add("Quantity Per Unit");
            row.Cells.Add("Unit Price");
            row.Cells.Add("Unit In Stock");
            row.Cells.Add("Units On Order");
            row.Cells.Add("Reorder Level");
            row.Cells.Add("Discontinued");
        }
예제 #18
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));
            }
                );
        }
예제 #19
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));
        }
        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;
            }
        }
예제 #21
0
        public List <ClsUserDetails> SignIn(ClsUserSignIn ObjUser)
        {
            try
            {
                DBParameterCollection ObJParameterCOl = new DBParameterCollection();
                DBParameter           objDBParameter  = new DBParameter("@UserCode", ObjUser.User_Code, DbType.String);
                ObJParameterCOl.Add(objDBParameter);
                objDBParameter = new DBParameter("@password", ObjUser.Password, DbType.String);
                ObJParameterCOl.Add(objDBParameter);
                objDBParameter = new DBParameter("@IsSocialLogin", ObjUser.IsSocialLogin, DbType.Boolean);
                ObJParameterCOl.Add(objDBParameter);

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

                List <ClsUserDetails> objUserDetails = new List <ClsUserDetails>();

                if (ds != null)
                {
                    if (ds.Tables[0].Rows.Count > 0)
                    {
                        objUserDetails = ds.Tables[0].AsEnumerable().Select(Row =>
                                                                            new ClsUserDetails
                        {
                            Ref_User_ID      = Row.Field <Int64>("Ref_User_ID"),
                            UserCode         = Row.Field <string>("UserCode"),
                            FullName         = Row.Field <string>("FullName"),
                            EmailID          = Row.Field <string>("EmailID"),
                            MobileNumber     = Row.Field <string>("MobileNumber"),
                            Bio              = Row.Field <string>("Bio"),
                            Gender           = Row.Field <string>("Gender"),
                            StudioGears      = Row.Field <string>("StudioGears"),
                            PayPalEmailID    = Row.Field <string>("PayPalEmailID"),
                            SocialProfileUrl = Row.Field <string>("SocialProfileUrl"),
                            Response         = Row.Field <string>("Response"),
                            FileManager      = ds.Tables[1].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(),
                            UserMaster = ds.Tables[2].AsEnumerable().Select(Row2 =>
                                                                            new ClsUserMasterMapping
                            {
                                MasterName     = Row2.Field <string>("MasterName"),
                                MasterDataName = Row2.Field <string>("MasterDataName"),
                            }).ToList(),
                        }).ToList();
                    }
                }
                return(objUserDetails);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
예제 #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
    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;
    }
예제 #24
0
 /// <summary>
 /// Returns the hashcode for the object.
 /// </summary>
 public override int GetHashCode()
 {
     return(GeometRi3D.HashFunction(Row1.GetHashCode(), Row2.GetHashCode(), Row3.GetHashCode()));
 }
예제 #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
        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;
                }
            }
        }
예제 #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 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;
            }
        }
예제 #29
0
 public override string ToString()
 {
     return(Row0.ToString() + "\n" + Row1.ToString() + "\n" + Row2.ToString() + "\n" + Row3.ToString());
 }
예제 #30
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;
            }
        }
        public static Page CreateCalendarPage(DateTime date)
        {
            Page page = new Page(PageSize.Letter, PageOrientation.Landscape);

            // Uncomment the line below to add a loyout grid to the page
            //page.Elements.Add( new LayoutGrid() );

            // Create a table and set it's properties
            Table2 table = new Table2(0, 40, page.Dimensions.Body.Width, page.Dimensions.Body.Height - 40, Font.Helvetica, 12);

            table.CellDefault.TextColor    = RgbColor.Navy;
            table.CellDefault.Border.Color = RgbColor.CornflowerBlue;
            table.Border.Color             = RgbColor.CornflowerBlue;

            AddColumns(table, page.Dimensions.Body.Width);

            CreateDaysOfWeekHeader(table);

            // Calculate some properties of the month
            int   startDay     = (43 - date.Day + (int)date.DayOfWeek) % 7;
            int   daysInMonth  = DateTime.DaysInMonth(date.Year, date.Month);
            int   requiredRows = (int)Math.Ceiling((daysInMonth + startDay) / 7.0f);
            float rowHeight    = (page.Dimensions.Body.Height - 60) / requiredRows;

            Row2 row      = null;
            int  position = 0;

            // Add a blank entry for Sunday
            if (startDay != 0)
            {
                row = table.Rows.Add(rowHeight, Font.Helvetica, 14);
                row.Cells.Add(" ", Font.Helvetica, 15, RgbColor.Red, RgbColor.AliceBlue, 1);
                position++;
            }

            // Add any additional blank entries days of previous month
            while (position < startDay)
            {
                row.Cells.Add(" ");
                position++;
            }

            // Add the days of the month to the myTable
            for (int day = 1; day <= daysInMonth; day++)
            {
                if (position++ % 7 == 0)
                {
                    row = table.Rows.Add(rowHeight, Font.Helvetica, 14);
                    row.Cells.Add(day.ToString(), Font.Helvetica, 14, RgbColor.Red, RgbColor.AliceBlue, 1);
                }
                else
                {
                    row.Cells.Add(day.ToString());
                }
            }

            // Add any additional blank entries to the end of the table
            while (position++ % 7 != 0)
            {
                row.Cells.Add(" ");
            }

            // Add the table to the Page
            page.Elements.Add(table);

            // Create and add a Month label to the calendar
            Label label = new Label(date.ToString("MMMM yyyy"), 0, 0, page.Dimensions.Body.Width, 50, Font.Helvetica, 23, TextAlign.Center, RgbColor.DeepPink);

            page.Elements.Add(label);
            return(page);
        }