Exemple #1
0
 private static void CloneTerritory(Meina_Territory t, Meina_Territory row)
 {
     row.ym                = t.ym;
     row.region            = t.region;
     row.gm_position_name  = t.gm_position_name;
     row.gm_emp_code       = t.gm_emp_code;
     row.gm_name           = t.gm_name;
     row.sd_position_name  = t.sd_position_name;
     row.sd_emp_code       = t.sd_emp_code;
     row.sd_name           = t.sd_name;
     row.rd_position_name  = t.rd_position_name;
     row.rd_emp_code       = t.rd_emp_code;
     row.rd_name           = t.rd_name;
     row.asm_position_name = t.asm_position_name;
     row.asm_emp_code      = t.asm_emp_code;
     row.asm_name          = t.asm_name;
     row.rep_position_name = t.rep_position_name;
     row.rep_emp_code      = t.rep_emp_code;
     row.rep_name          = t.rep_name;
     row.hco_code          = t.hco_code;
     row.province          = t.province;
     row.city              = t.city;
     row.hco_name          = t.hco_name;
 }
Exemple #2
0
        public static List <Meina_Territory> Process(IEnumerable <Meina_Territory> rawList)
        {
            List <Meina_Territory> results = new List <Meina_Territory>();

            foreach (Meina_Territory t in rawList)
            {
                if (t.Dermatix.Trim().ToLower() == "y")
                {
                    Meina_Territory row = new Meina_Territory();
                    CloneTerritory(t, row);

                    row.product_name = "Dermatix";
                    results.Add(row);
                }
                if (t.Espumisan.Trim().ToLower() == "y")
                {
                    Meina_Territory row = new Meina_Territory();
                    CloneTerritory(t, row);

                    row.product_name = "Espumisan";
                    results.Add(row);
                }
                if (t.Ezerra.Trim().ToLower() == "y")
                {
                    Meina_Territory row = new Meina_Territory();
                    CloneTerritory(t, row);

                    row.product_name = "Ezerra";
                    results.Add(row);
                }
                if (t.Fastum.Trim().ToLower() == "y")
                {
                    Meina_Territory row = new Meina_Territory();
                    CloneTerritory(t, row);

                    row.product_name = "Fastum";
                    results.Add(row);
                }
                if (t.Gengigel.Trim().ToLower() == "y")
                {
                    Meina_Territory row = new Meina_Territory();
                    CloneTerritory(t, row);

                    row.product_name = "Gengigel";
                    results.Add(row);
                }
                if (t.Kestine.Trim().ToLower() == "y")
                {
                    Meina_Territory row = new Meina_Territory();
                    CloneTerritory(t, row);

                    row.product_name = "Kestine";
                    results.Add(row);
                }
                if (t.Letrox.Trim().ToLower() == "y")
                {
                    Meina_Territory row = new Meina_Territory();
                    CloneTerritory(t, row);

                    row.product_name = "Letrox";
                    results.Add(row);
                }
                if (t.Neuquinon.Trim().ToLower() == "y")
                {
                    Meina_Territory row = new Meina_Territory();
                    CloneTerritory(t, row);

                    row.product_name = "Neuquinon";
                    results.Add(row);
                }
                if (t.Priligy.Trim().ToLower() == "y")
                {
                    Meina_Territory row = new Meina_Territory();
                    CloneTerritory(t, row);

                    row.product_name = "Priligy";
                    results.Add(row);
                }
                if (t.Spasmomen.Trim().ToLower() == "y")
                {
                    Meina_Territory row = new Meina_Territory();
                    CloneTerritory(t, row);

                    row.product_name = "Spasmomen";
                    results.Add(row);
                }
                if (t.Zostex.Trim().ToLower() == "y")
                {
                    Meina_Territory row = new Meina_Territory();
                    CloneTerritory(t, row);

                    row.product_name = "Zostex";
                    results.Add(row);
                }
                if (t.Rilaten.Trim().ToLower() == "y")
                {
                    Meina_Territory row = new Meina_Territory();
                    CloneTerritory(t, row);

                    row.product_name = "Rilaten";
                    results.Add(row);
                }
                if (t.Easyhaler.Trim().ToLower() == "y")
                {
                    Meina_Territory row = new Meina_Territory();
                    CloneTerritory(t, row);

                    row.product_name = "Easyhaler";
                    results.Add(row);
                }
            }

            return(results);
        }