Beispiel #1
0
        public static void Advance_process(long idbatch, string process)
        {
            CTrace_batchFactory faTrace_batch = new CTrace_batchFactory();

            // --- get a process existing
            CTrace_batch oTrace_batch = new LimsProject.BusinessLayer.Modules.ModProcessBatch().GetLastProcessBatch(process, idbatch);

            if (oTrace_batch == null)
            {
                oTrace_batch         = new CTrace_batch();
                oTrace_batch.Date_in = Comun.GetDate();
                oTrace_batch.Usernew = Comun.GetUser();
                oTrace_batch.Idbatch = idbatch;
            }

            oTrace_batch.Cod_process = process;
            //oTrace_batch.Cod_module = module;
            oTrace_batch.Usernew        = Comun.GetUser();
            oTrace_batch.Useredit       = Comun.GetUser();
            oTrace_batch.Status_process = Convert.ToChar(LimsProcess.Status_Process.InProcess);

            if (!faTrace_batch.Update(oTrace_batch))
            {
                faTrace_batch.Insert(oTrace_batch);
            }
        }
Beispiel #2
0
        public static void Finalize_process(long idbatch, string process, string sgtProcess)
        {
            CTrace_batchFactory faTrace_batch = new CTrace_batchFactory();

            // --- get a process existing
            CTrace_batch oTrace_batch = new LimsProject.BusinessLayer.Modules.ModProcessBatch().GetLastProcessBatch(process, idbatch);
            CProcess     oProcess     = new CProcessFactory().GetByPrimaryKey(new CProcessKeys(process));

            if (oTrace_batch == null)
            {
                oTrace_batch         = new CTrace_batch();
                oTrace_batch.Date_in = Comun.GetDate();
                oTrace_batch.Usernew = Comun.GetUser();
                oTrace_batch.Idbatch = idbatch;
            }

            oTrace_batch.Date_out    = Comun.GetDate();
            oTrace_batch.Cod_process = process;
            //oTrace_batch.Cod_module = modulo;
            oTrace_batch.Useredit       = Comun.GetUser();
            oTrace_batch.Status_process = Convert.ToChar(LimsProcess.Status_Process.Finished);

            if (!faTrace_batch.Update(oTrace_batch))
            {
                faTrace_batch.Insert(oTrace_batch);
            }

            // --- create a new process
            Initialize_process(idbatch, sgtProcess);
        }
Beispiel #3
0
        public static void Advance_process(long idbatch, string process)
        {
            CTrace_batchFactory faTrace_batch = new CTrace_batchFactory();

            // --- get a process existing
            CTrace_batch oTrace_batch = new LimsProject.BusinessLayer.Modules.ModProcessBatch().GetLastProcessBatch(process, idbatch);

            if (oTrace_batch == null)
            {
                oTrace_batch = new CTrace_batch();
                oTrace_batch.Date_in = Comun.GetDate();
                oTrace_batch.Usernew = Comun.GetUser();
                oTrace_batch.Idbatch = idbatch;
            }

            oTrace_batch.Cod_process = process;
            //oTrace_batch.Cod_module = module;
            oTrace_batch.Usernew = Comun.GetUser();
            oTrace_batch.Useredit = Comun.GetUser();
            oTrace_batch.Status_process = Convert.ToChar(LimsProcess.Status_Process.InProcess);

            if (!faTrace_batch.Update(oTrace_batch))
                faTrace_batch.Insert(oTrace_batch);
        }
Beispiel #4
0
        public static void Finalize_process(long idbatch, string process, string sgtProcess)
        {
            CTrace_batchFactory faTrace_batch = new CTrace_batchFactory();

            // --- get a process existing
            CTrace_batch oTrace_batch = new LimsProject.BusinessLayer.Modules.ModProcessBatch().GetLastProcessBatch(process, idbatch);
            CProcess oProcess = new CProcessFactory().GetByPrimaryKey(new CProcessKeys(process));

            if (oTrace_batch == null)
            {
                oTrace_batch = new CTrace_batch();
                oTrace_batch.Date_in = Comun.GetDate();
                oTrace_batch.Usernew = Comun.GetUser();
                oTrace_batch.Idbatch = idbatch;
            }

            oTrace_batch.Date_out = Comun.GetDate();
            oTrace_batch.Cod_process = process;
            //oTrace_batch.Cod_module = modulo;
            oTrace_batch.Useredit = Comun.GetUser();
            oTrace_batch.Status_process = Convert.ToChar(LimsProcess.Status_Process.Finished);

            if (!faTrace_batch.Update(oTrace_batch))
                faTrace_batch.Insert(oTrace_batch);

            // --- create a new process
            Initialize_process(idbatch, sgtProcess);
        }