Exemplo n.º 1
0
        public PRPDBatchActivityInstructions.PRPDBatchActivityInstructionsCollec Get()
        {
            try
            {
                DataTable dt = Execute.RunSP_DataTable(Connection, "SPGET_PRPDBatchActivityInstructions");

                PRPDBatchActivityInstructions.PRPDBatchActivityInstructionsCollec objCollec = new PRPDBatchActivityInstructions.PRPDBatchActivityInstructionsCollec();
                PRPDBatchActivityInstructions obj = new PRPDBatchActivityInstructions();

                if (dt.Rows.Count > 0)
                {
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        obj.PRPDBatchActivityInstructionsID = Convert.ToInt64(dt.Rows[i]["PRPDBatchActivityInstructionsID"]);
                        obj.PRPDBatch       = objPRPDBatch_DL.Get(Convert.ToString(dt.Rows[i]["PRPDBatchID"]));
                        obj.Machine         = objMachine_DL.Get(Convert.ToString(dt.Rows[i]["MachineID"]));
                        obj.Activity        = objMainActivity_DL.Get(Convert.ToInt64(dt.Rows[i]["ActivityID"]));
                        obj.ActivityID      = Convert.ToInt64(dt.Rows[i]["ActivityID"]);
                        obj.MachineCode     = Convert.ToString(dt.Rows[i]["MachineID"]);
                        obj.ParticleSize    = Convert.ToString(dt.Rows[i]["ParticleSize"]);
                        obj.InstructionDesc = Convert.ToString(dt.Rows[i]["InstructionDesc"]);

                        objCollec.Add(obj);
                    }
                }

                return(objCollec);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }