} // Init() //protected override void ReactionSCSectionDo(RefSection e) //{ // if (CurrentAction != ActionSet.ScanAdress) // { // Negative("Неверно! " + SS.WhatUNeed(CurrentAction)); // return; // } // if (e.ID != Task.Adress0.ID) // { // Negative("Неверный адрес!"); // return; // } // CurrentAction = ActionSet.ScanPallete; // Positive(SS.WhatUNeed(CurrentAction)); //} // ReactionSCSectionDo //protected override void ReactionPalleteDo(string barcode) //{ // if (CurrentAction != ActionSet.ScanPallete) // { // Negative("Неверно! " + SS.WhatUNeed(CurrentAction)); // return; // } // if (Task.PalleteBarcode != barcode) // { // Negative("Неверная паллета! Где вы это взяли?"); // return; // } // PalleteBarcode = barcode; // TaskEnd(); //} // ReactionPalleteDo override protected bool TaskComplete() { string TextQuery = "declare @result int; exec WPM_TaskLoaderDownAntrisoleComplete :id, :Adress1, @result out; select @result;"; SQL1S.QuerySetParam(ref TextQuery, "id", Task.ID); SQL1S.QuerySetParam(ref TextQuery, "Adress1", Adress1.ID); return((int)SS.ExecuteScalar(TextQuery) == 0 ? false : true); } // DownTaskComplete
} // TaskEnd /// <summary> /// /// </summary> /// <returns></returns> virtual protected bool TaskComplete() { string TextQuery = "update $Спр.ПеремещенияПаллет set " + "$Спр.ПеремещенияПаллет.Дата1 = :NowDate, " + "$Спр.ПеремещенияПаллет.Время1 = :NowTime, " + "$Спр.ПеремещенияПаллет.ФлагОперации = 2 " + "where id = :id; " + "select @@rowcount;"; SQL1S.QuerySetParam(ref TextQuery, "id", Task.ID); return((int)SS.ExecuteScalar(TextQuery) == 0 ? false : true); } // DownTaskComplete
} // GetTaskLoaderDown protected bool CheckPallete(string barcode) { string TextQuery = "select count(*) from $Спр.ПеремещенияПаллет (nolock) " + "where " + "$Спр.ПеремещенияПаллет.ФлагОперации in (1,0) " + "and $Спр.ПеремещенияПаллет.ШКПаллеты = :barcode " + "and ismark = 0"; SQL1S.QuerySetParam(ref TextQuery, "barcode", barcode); if ((int)SS.ExecuteScalar(TextQuery) > 0) { Negative("Возможна только одна паллета с одним ШК!"); return(false); } return(true); } // CheckPallete
} // ReactionPalleteDo /// <summary> /// /// </summary> /// <returns></returns> override protected bool TaskComplete() { string TextQuery = "update $Спр.ПеремещенияПаллет set $Спр.ПеремещенияПаллет.ШКПаллеты = :pallete_barcode where id = :id "; SQL1S.QuerySetParam(ref TextQuery, "id", Task.ID); SQL1S.QuerySetParam(ref TextQuery, "pallete_barcode", PalleteBarcode); SS.ExecuteWithoutReadNew(TextQuery); //Насрать что там // TextQuery = "declare @result int; exec WPM_TaskLoaderDownComplete :id, @result out; select @result;"; SQL1S.QuerySetParam(ref TextQuery, "id", Task.ID); if ((int)SS.ExecuteScalar(TextQuery) == 0) { return(false); } //Теперь дозапишем шк паллеты return(true); } // DownTaskComplete