示例#1
0
        public void InitRowsWithTaisyakuKamoku(models.db.mtables.MTKamoku table, models.db.mtables.MTDaikubun daikubun, string orderBy = "kamoku_code")
        {
            this.ClearRows();
            this.InitColumns(4, 3, 0);
            this.SetColumnVisibility(3, false);

            foreach (var row in table.Select("order by " + orderBy))
            {
                string daikubunStr = "";

                var daikubunRow = daikubun.Select("where id = " + row.GetLong("daikubun_id", -1));
                if (daikubunRow.Count() > 0)
                {
                    daikubunStr = daikubunRow.First().GetStr("daikubun");
                    string daikubunCode = daikubunRow.First().GetStr("daikubun_code");
                    if (int.Parse(daikubunCode) == (int)models.constants.MTDaikubunCode.JikiKurikoshikatsudouSyuushiSagaku)
                    {
                        continue;
                    }
                    if (daikubunRow.First().GetLong("taisyaku_taisyou_id", 0) <= 0)
                    {
                        continue;
                    }
                }
                this.AddRow(row.GetStr("kamoku_code", "00000"), daikubunStr, row.GetStr("kamoku", ""), row.GetLong("id", 0));
            }
            this.AdjustDropDownWidth();
            bindedTable = table;
        }
示例#2
0
 // 大区分
 public void InitRowsWithMTDaikubun(models.db.mtables.MTDaikubun table, string orderBy = "daikubun_code")
 {
     this.ClearRows();
     this.InitColumns(2, 1, 0);
     this.SetColumnVisibility(1, false);
     foreach (var row in table.Select("order by " + orderBy))
     {
         this.AddRow(row.GetStr("daikubun", ""), row.GetStr("daikubun_code", "000"));
     }
     this.AdjustDropDownWidth();
     bindedTable = table;
 }
示例#3
0
        public void InitRowsWithMTKamokuFilterByMTDaikubun(models.db.mtables.MTKamoku table, models.db.mtables.MTDaikubun daikubun, int daikubunCode, string orderBy = "kamoku_code")
        {
            this.ClearRows();
            this.InitColumns(4, 3, 0);
            this.SetColumnVisibility(3, false);

            string daikubunStr = "";
            int    daikubunId  = 0;
            var    daikubunRow = daikubun.Select("where daikubun_code = '" + daikubunCode + "'");

            if (daikubunRow.Count() > 0)
            {
                daikubunStr = daikubunRow.First().GetStr("daikubun");
                daikubunId  = (int)daikubunRow.First().GetLong("id", 0);
            }

            foreach (var row in table.Select("where daikubun_id = " + daikubunId + " order by " + orderBy))
            {
                this.AddRow(row.GetStr("kamoku_code", "00000"), daikubunStr, row.GetStr("kamoku", ""), row.GetLong("id", 0));
            }
            this.AdjustDropDownWidth();
            bindedTable = table;
        }