Exemple #1
0
        public bool ActualizarTccol307(Ent_ttccol307 ObjTtccol307)
        {
            string strError  = string.Empty;
            bool   Resultado = false;

            method = MethodBase.GetCurrentMethod();

            paramList = new Dictionary <string, object>();
            paramList.Add(":T$USER", ObjTtccol307.USRR_AUX);
            paramList.Add(":T$STAT", ObjTtccol307.STAT_AUX);
            paramList.Add(":T$PAID", ObjTtccol307.PAID_AUX);
            paramList.Add(":T$PROC", ObjTtccol307.PROC_AUX);
            paramList.Add(":T$CWAR", ObjTtccol307.CWAR_AUX);
            paramList.Add(":USER", ObjTtccol307.USRR);
            paramList.Add(":STAT", ObjTtccol307.STAT);
            paramList.Add(":PAID", ObjTtccol307.PAID);
            paramList.Add(":PROC", ObjTtccol307.PROC);
            paramList.Add(":CWAR", ObjTtccol307.CWAR);
            strSentencia = recursos.readStatement(method.ReflectedType.Name, method.Name, ref owner, ref env, tabla, paramList);

            try
            {
                Resultado = DAL.BaseDAL.BaseDal.EjecutarCrud("Text", strSentencia, ref parametersOut, null, false);
            }
            catch (Exception ex)
            {
                strError = "Error when querying data [ttccol307]. Try again or contact your administrator";
                //throw ex;
            }
            return(Resultado);
        }
        protected void Page_Init(object sender, EventArgs e)
        {
            if (HttpContext.Current.Session["PICKUSING"] != null && HttpContext.Current.Session["CWARUSING"] != null)
            {
                Ent_ttccol307 tccol307 = new Ent_ttccol307();
                tccol307.PAID     = HttpContext.Current.Session["PICKUSING"].ToString();
                tccol307.CWAR     = HttpContext.Current.Session["CWARUSING"].ToString();
                tccol307.STAT_AUX = "1";
                _idaltccol307.ActualizarTccol307(tccol307);

                HttpContext.Current.Session["PICKUSING"] = null;
                HttpContext.Current.Session["CWARUSING"] = null;
            }
        }
Exemple #3
0
        //insert picking ok


        public int IngRegistrott307140(string USER, int PDNO, string SQNB, int REFCNTD, int REFCNTU)
        {
            method = MethodBase.GetCurrentMethod();
            bool   retorno = false;
            string metodo2 = "tticol082";
            string tabla   = ".ttccol307";
            string name1   = "InserPickl307140";

            string strError = string.Empty;

            Ent_ttccol307 Objtticol307140 = new Ent_ttccol307();

            Objtticol307140.USRR    = USER.Trim();
            Objtticol307140.STAT    = PDNO.ToString();
            Objtticol307140.PAID    = SQNB.Trim();
            Objtticol307140.REFCNTD = REFCNTD;
            Objtticol307140.REFCNTU = REFCNTU;
            List <Ent_ParametrosDAL> parametrosIn = new List <Ent_ParametrosDAL>();

            paramList = new Dictionary <string, object>();
            paramList.Add(":T$USER", Objtticol307140.USRR);
            paramList.Add(":T$STAT", Objtticol307140.STAT);
            paramList.Add(":T$PAID", Objtticol307140.PAID);
            paramList.Add(":T$REFCNTD", Objtticol307140.REFCNTD);
            paramList.Add(":T$REFCNTU", Objtticol307140.REFCNTU);

            strSentencia = recursos.readStatement(metodo2, name1, ref owner, ref env, tabla, paramList);

            try
            {
                consulta = DAL.BaseDAL.BaseDal.EjecutarCons("Text", strSentencia, ref parametersOut, null, true);
            }

            catch (Exception ex)
            {
                strError = "Error when inserting data [ttccol301]. Try again or contact your administrator \n";
                log.escribirError(strError + Console.Out.NewLine + ex.Message, stackTrace.GetFrame(1).GetMethod().Name, method.Name, method.ReflectedType.Name);
            }

            return(Convert.ToInt32(retorno));
        }
Exemple #4
0
        public DataTable ConsultarRegistrotccol307(Ent_ttccol307 ObjTtccol307)
        {
            string    strError = string.Empty;
            DataTable Consulta = new DataTable();

            method = MethodBase.GetCurrentMethod();

            paramList = new Dictionary <string, object>();
            paramList.Add(":PAID", ObjTtccol307.PAID.Trim());

            strSentencia = recursos.readStatement(method.ReflectedType.Name, method.Name, ref owner, ref env, tabla, paramList);

            try
            {
                Consulta = DAL.BaseDAL.BaseDal.EjecutarCons("Text", strSentencia, ref parametersOut, null, true);
            }
            catch (Exception ex)
            {
                strError = "Error when querying data [ttccol307]. Try again or contact your administrator";
                throw ex;
            }
            return(Consulta);
        }
Exemple #5
0
        public bool ActualizarUsuariotccol307(Ent_ttccol307 ObjTtccol307)
        {
            string strError             = string.Empty;
            bool   ActualizacionExitosa = false;

            method    = MethodBase.GetCurrentMethod();
            paramList = new Dictionary <string, object>();
            paramList.Add(":PICK", ObjTtccol307.PAID);
            paramList.Add(":USER", ObjTtccol307.USRR);

            strSentencia = recursos.readStatement(method.ReflectedType.Name, method.Name, ref owner, ref env, tabla, paramList);

            try
            {
                ActualizacionExitosa = DAL.BaseDAL.BaseDal.EjecutarCrud("Text", strSentencia, ref parametersOut, null, false);
            }
            catch (Exception ex)
            {
                strError = "Error when querying data [ttccol303]. Try again or contact your administrator";
                throw ex;
            }

            return(ActualizacionExitosa);
        }
Exemple #6
0
        public DataTable ConsultarTt307140(Ent_ttccol307 Objttccol307)
        {
            method = MethodBase.GetCurrentMethod();
            DataTable retorno = new DataTable();

            string strError = string.Empty;

            paramList = new Dictionary <string, object>();
            paramList.Add(":T$USER", Objttccol307.USRR);

            strSentencia = recursos.readStatement(method.ReflectedType.Name, method.Name, ref owner, ref env, tabla, paramList);

            try
            {
                retorno = DAL.BaseDAL.BaseDal.EjecutarCons("Text", strSentencia, ref parametersOut, null, true);
            }

            catch (Exception ex)
            {
                strError = "Error when inserting data [ttccol301]. Try again or contact your administrator \n";
                log.escribirError(strError + Console.Out.NewLine + ex.Message, stackTrace.GetFrame(1).GetMethod().Name, method.Name, method.ReflectedType.Name);
            }
            return(retorno);
        }
 public bool Insertarttccol307(Ent_ttccol307 tccol307)
 {
     return(dal.Insertarttccol307(tccol307));
 }
Exemple #8
0
 public DataTable ConsultarTt307140Proc(Ent_ttccol307 MyObj307)
 {
     return(dal.ConsultarTt307140(MyObj307));
 }
Exemple #9
0
 public DataTable ConsultarTt307140(Ent_ttccol307 Objttccol307)
 {
     return(dal.ConsultarTt307140(Objttccol307));
 }
Exemple #10
0
        public static string Clic_Pick(string PAID)
        {
            try
            {
                string    retorno            = string.Empty;
                string    USRR               = HttpContext.Current.Session["user"].ToString();
                DataTable DTtccol307PalletID = twhcol130DAL.Consultarttccol307(PAID, USRR);


                if (DTtccol307PalletID.Rows.Count > 0)
                {
                    Error ReturnError = new Error {
                        MyError = string.Format(TheIDpalledPendingToLocateByUser, DTtccol307PalletID.Rows[0]["PAID"].ToString().Trim(), DTtccol307PalletID.Rows[0]["USRR"].ToString().Trim())
                    };
                    retorno = JsonConvert.SerializeObject(ReturnError);
                }
                else if (DTtccol307PalletID.Rows.Count == 0)
                {
                    DataTable DTtccol307User = twhcol130DAL.Consultarttccol307(string.Empty, USRR);
                    if (DTtccol307User.Rows.Count > 0)
                    {
                        Error ReturnError = new Error
                        {
                            MyError = string.Format(YouHaveTheIDPalletPendingToLocate, DTtccol307User.Rows[0]["PAID"].ToString().Trim())
                        };
                        retorno = JsonConvert.SerializeObject(ReturnError);
                    }
                    else
                    {
                        string PROG = "Picking";
                        List <Ent_twhcol130131> LstPallet = twhcol130DAL.ConsultarPorPalletIDReimpresion(PAID.Trim().ToUpper(), USRR, PROG, "");

                        if (LstPallet.Count > 0)
                        {
                            if (LstPallet[0].STAT == "1" && LstPallet[0].RCNO.ToString().Trim() != "")
                            {
                                Ent_ttccol307 tccol307 = new Ent_ttccol307
                                {
                                    PAID    = PAID,
                                    REFCNTD = 0,
                                    REFCNTU = 0,
                                    STAT    = "2",
                                    USRR    = USRR,
                                    CWAR    = LstPallet[0].CWAR,
                                    PROC    = "3"
                                };

                                if (LstPallet[0].LOGT.Trim() == string.Empty)
                                {
                                    bool InsertSucces = twhcol130DAL.Insertarttccol307(tccol307);

                                    string PICK = "1";
                                    string DATK = DateTime.Now.ToString("dd/MM/yyyy").ToString();
                                    string LOGP = HttpContext.Current.Session["user"].ToString();
                                    string STAT = "2";

                                    twhcol130DAL.ActualizacionPickMaterialWhcol130(PAID, PICK, DATK, LOGP, STAT);


                                    retorno = JsonConvert.SerializeObject(LstPallet[0]);
                                }
                                else
                                {
                                    Error ReturnError = new Error
                                    {
                                        MyError = TheIDPalletAlreadyBeenLocated
                                    };

                                    retorno = JsonConvert.SerializeObject(ReturnError);
                                }
                            }
                            else
                            {
                                Error ReturnError = new Error
                                {
                                    MyError = ThePalletIDStatusisNotReceived
                                };

                                retorno = JsonConvert.SerializeObject(ReturnError);
                            }
                        }
                        else
                        {
                            Error ReturnError = new Error
                            {
                                MyError = TheIDPalletDoesNotExist
                            };

                            retorno = JsonConvert.SerializeObject(ReturnError);
                        }
                    }
                }
                return(retorno);
            }
            catch (Exception e)
            {
                return(e.ToString());
            }
        }
 public bool EliminarRegistrotccol307Null(Ent_ttccol307 ent_ttccol307)
 {
     return(dal.EliminarRegistrotccol307Null(ent_ttccol307));
 }
 public DataTable ConsultarRegistrotccol307Null(Ent_ttccol307 ObjTtccol307)
 {
     return(dal.ConsultarRegistrotccol307Null(ObjTtccol307));
 }
 public bool ActualizarTccol307(Ent_ttccol307 ObjTtccol307)
 {
     return(dal.ActualizarTccol307(ObjTtccol307));
 }