Beispiel #1
0
        public Esn_Class getcopy()
        {
            Esn_Class ecl = new Esn_Class();

            ecl.id      = this.id;
            ecl.sotr_id = this.sotr_id;
            ecl.dts_id  = this.dts_id;
            ecl.org_id  = this.org_id;
            ecl.tipsotr = this.tipsotr;
            ecl.squadid = this.squadid;
            ecl.year_   = this.year_;
            ecl.month_  = this.month_;
            ecl.tag     = this.tag;

            ecl.schet      = this.schet;
            ecl.def_prov   = this.def_prov;
            ecl.prov921    = this.prov921;
            ecl.prov922    = this.prov922;
            ecl.prov923    = this.prov923;
            ecl.prov901    = this.prov901;
            ecl.prov911    = this.prov911;
            ecl.prov903    = this.prov903;
            ecl.prov904    = this.prov904;
            ecl.prov924    = this.prov924;
            ecl.sprrash_id = this.sprrash_id;
            foreach (string s in this.Keys)
            {
                ecl.Add(s, this[s]);
            }
            ;
            return(ecl);
        }
Beispiel #2
0
        public void frmMain_refrgrd(bool naritog)
        {
            esn_list aresn0 = new esn_list();

            aresn0.get_esn(212, Convert.ToDateTime("01/01/2013"), Convert.ToDateTime("31/12/2013"), naritog, true, false);
            esn_list aresn = aresn0.getone(aresn0[10].sotr_id);

            esn_list arorg = aresn.shrinklist(true);

            int i, j;

            for (i = 1; i < 13; i++)
            {
                bool bfind = true;
                for (j = 0; j < arorg.Count; j++)
                {
                    if (arorg[j].month_ == i)
                    {
                        bfind = false;
                    }
                    ;
                }
                ;
                if (bfind)
                {
                    Esn_Class ecl = new Esn_Class();
                    ecl.year_  = 2013;
                    ecl.month_ = i;
                    ecl.Add("all_sum", 0);
                    ecl.Add("dmppf", 0);
                    ecl.Add("dnepf", 0);
                    ecl.Add("dbazapf", 0);
                    ecl.Add("dpf3", 0);
                    ecl.Add("dpf1", 0);
                    ecl.Add("dpf2", 0);
                    arorg.Add(ecl);
                }
                ;
            }


            arorg.Sort(delegate(Esn_Class ecl1, Esn_Class ecl2)
                       { return(ecl1.month_.CompareTo(ecl2.month_)); });

            stg.RowCount = 12;
            stg.Columns[0].HeaderText  = "ID";
            stg.Columns[1].HeaderText  = @"sotrid";
            stg.Columns[2].HeaderText  = @"god";
            stg.Columns[3].HeaderText  = @"mes";
            stg.Columns[4].HeaderText  = @"all";
            stg.Columns[5].HeaderText  = @"mp";
            stg.Columns[6].HeaderText  = @"ne";
            stg.Columns[7].HeaderText  = @"baza";
            stg.Columns[8].HeaderText  = @"pfstr";
            stg.Columns[9].HeaderText  = @"pfnak";
            stg.Columns[10].HeaderText = @"pfprev";

            for (i = 0; i < 12; i++)
            {
                stg.Rows[i].Cells[0].Value  = Convert.ToString(0);
                stg.Rows[i].Cells[1].Value  = Convert.ToString(0);
                stg.Rows[i].Cells[2].Value  = Convert.ToString(arorg[i].year_);
                stg.Rows[i].Cells[3].Value  = Convert.ToString(arorg[i].month_);
                stg.Rows[i].Cells[4].Value  = Convert.ToString(arorg[i].getstrvalue("all_sum"));
                stg.Rows[i].Cells[5].Value  = Convert.ToString(arorg[i].getstrvalue("dmppf"));
                stg.Rows[i].Cells[6].Value  = Convert.ToString(arorg[i].getstrvalue("dnepf"));
                stg.Rows[i].Cells[7].Value  = Convert.ToString(arorg[i].getstrvalue("dbazapf"));
                stg.Rows[i].Cells[8].Value  = Convert.ToString(arorg[i].getstrvalue("dpf2"));
                stg.Rows[i].Cells[9].Value  = Convert.ToString(arorg[i].getstrvalue("dpf3"));
                stg.Rows[i].Cells[10].Value = Convert.ToString(arorg[i].getstrvalue("dpf1"));
            }
        }