Example #1
0
        private void InitializeListForFilterTags()
        {
            // All Tags
            AccNamesForFilterTags = new List <AccName>();
            var list = new List <string>()
            {
                "Внешние", "Все доходы", "Все расходы"
            };

            foreach (var element in list)
            {
                var root = new AccName().PopulateFromAccount(_db.SeekAccount(element), null);
                AccNamesForFilterTags.Add(root);
            }
        }
Example #2
0
        private void InitializeListsForExpense()
        {
            // Expense
            MyAccNamesForExpense = new List <AccName>
            {
                new AccName().PopulateFromAccount(_db.SeekAccount("Мои"),
                                                  new List <string> {
                    "Закрытые", "Закрытые депозиты", "Мне должны", "Депозиты"
                })
            };

            // Expense Tags
            AccNamesForExpenseTags = new List <AccName>();
            var list = new List <string>()
            {
                "ДеньгоПолучатели", "Банки", "Государство", "Все расходы"
            };

            foreach (var element in list)
            {
                var root = new AccName().PopulateFromAccount(_db.SeekAccount(element), null);
                AccNamesForExpenseTags.Add(root);
            }
        }
Example #3
0
        private void InitializeListsForExchange()
        {
            // Exchange
            MyAccNamesForExchange = new List <AccName>
            {
                new AccName().PopulateFromAccount(_db.SeekAccount("Мои"),
                                                  new List <string> {
                    "Закрытые", "Закрытые депозиты"
                })
            };

            // Exchange Tags
            AccNamesForExchangeTags = new List <AccName>();
            var list = new List <string>()
            {
                "Банки", "Форекс"
            };

            foreach (var element in list)
            {
                var root = new AccName().PopulateFromAccount(_db.SeekAccount(element), null);
                AccNamesForExchangeTags.Add(root);
            }
        }
Example #4
0
 public AccNameButtonVm(string name, AccName accName)
 {
     Name    = name;
     AccName = accName;
 }
Example #5
0
        protected bool IsRowModified3(GridViewRow r)
        {
            int currentID;
            //string emp_no;
            //string emp_cne;
            //string editdate;
            string year;
            string AccNO;
            string AccName;
            string dept_no;
            string mon01;
            string mon02;
            string mon03;
            string mon04;
            string mon05;
            string mon06;
            string mon07;
            string mon08;
            string mon09;
            string mon10;
            string mon11;
            string mon12;
            string ps;


            currentID = Convert.ToInt32(GridView3.DataKeys[r.RowIndex].Value);

            //emp_no = ((Label)r.FindControl("emp_no")).Text;
            //emp_cne = ((Label)r.FindControl("emp_cne")).Text;
            ////((Label)r.FindControl("editdate")).Text = DateTime.Now.Date.ToString("MM/dd");
            //editdate = DateTime.Now.Date.ToString("MM/dd");
            year    = ((Label)r.FindControl("year")).Text;
            AccNO   = ((Label)r.FindControl("AccNO")).Text;
            AccName = ((Label)r.FindControl("AccName")).Text;
            dept_no = ((Label)r.FindControl("dept_no")).Text;
            mon01   = ((TextBox)r.FindControl("mon01")).Text;
            mon02   = ((TextBox)r.FindControl("mon02")).Text;
            mon03   = ((TextBox)r.FindControl("mon03")).Text;
            mon04   = ((TextBox)r.FindControl("mon04")).Text;
            mon05   = ((TextBox)r.FindControl("mon05")).Text;
            mon06   = ((TextBox)r.FindControl("mon06")).Text;
            mon07   = ((TextBox)r.FindControl("mon07")).Text;
            mon08   = ((TextBox)r.FindControl("mon08")).Text;
            mon09   = ((TextBox)r.FindControl("mon09")).Text;
            mon10   = ((TextBox)r.FindControl("mon10")).Text;
            mon11   = ((TextBox)r.FindControl("mon11")).Text;
            mon12   = ((TextBox)r.FindControl("mon12")).Text;
            ps      = ((TextBox)r.FindControl("ps")).Text;

            DataRow row = originalDataTable3.Select(String.Format("no = {0}", currentID))[0];

            //if (!emp_no.Equals(row["emp_no"].ToString())) { return true; }
            //if (!emp_cne.Equals(row["emp_cne"].ToString())) { return true; }
            //if (!editdate.Equals(row["editdate"].ToString())) { return true; }
            if (!year.Equals(row["year"].ToString()))
            {
                return(true);
            }
            if (!AccNO.Equals(row["AccNO"].ToString()))
            {
                return(true);
            }
            if (!AccName.Equals(row["AccName"].ToString()))
            {
                return(true);
            }
            if (!dept_no.Equals(row["dept_no"].ToString()))
            {
                return(true);
            }
            if (!mon01.Equals(row["mon01"].ToString()))
            {
                return(true);
            }
            if (!mon02.Equals(row["mon02"].ToString()))
            {
                return(true);
            }
            if (!mon03.Equals(row["mon03"].ToString()))
            {
                return(true);
            }
            if (!mon04.Equals(row["mon04"].ToString()))
            {
                return(true);
            }
            if (!mon05.Equals(row["mon05"].ToString()))
            {
                return(true);
            }
            if (!mon06.Equals(row["mon06"].ToString()))
            {
                return(true);
            }
            if (!mon07.Equals(row["mon07"].ToString()))
            {
                return(true);
            }
            if (!mon08.Equals(row["mon08"].ToString()))
            {
                return(true);
            }
            if (!mon09.Equals(row["mon09"].ToString()))
            {
                return(true);
            }
            if (!mon10.Equals(row["mon10"].ToString()))
            {
                return(true);
            }
            if (!mon11.Equals(row["mon11"].ToString()))
            {
                return(true);
            }
            if (!mon12.Equals(row["mon12"].ToString()))
            {
                return(true);
            }
            if (!ps.Equals(row["ps"].ToString()))
            {
                return(true);
            }
            return(false);
        }