public static long Fx_ins_tblModuleLogo(long pModuleId, string pFileName)
        {
            long lId = 0;

            object[][] lParameters = new object[2][];

            lParameters[0] = new object[] { "ModuleId", "Logo" };
            lParameters[1] = new object[] { pModuleId, pFileName };

            DataTable ObjDt = ClsConnection.FxSqlExecuteImage(ClsVariables.gDatabaseCore, lSchema, "sp_ins_tblModuleLogo", lParameters);

            if (ObjDt != null)
            {
                if (ObjDt.Rows.Count > 0)
                {
                    try
                    {
                        lId = long.Parse(ObjDt.Rows[0][0].ToString());
                    }
                    catch
                    {
                        lId = 0;
                    }
                }

                ObjDt.Dispose();
            }

            return(lId);
        }
        public static long Fx_upt_tblModule(long pModuleId, string pName, string pDescription, string pExecutable, bool pEnabled)
        {
            long lId = 0;

            object[][] lParameters = new object[2][];

            lParameters[0] = new object[] { "ModuleId", "Name", "Description", "Executable", "Enabled" };
            lParameters[1] = new object[] { pModuleId, pName, pDescription, pExecutable, pEnabled };

            DataTable ObjDt = ClsConnection.FxSqlExecute(ClsVariables.gDatabaseCore, lSchema, "sp_upt_tblModule", lParameters);

            if (ObjDt != null)
            {
                if (ObjDt.Rows.Count > 0)
                {
                    try
                    {
                        lId = long.Parse(ObjDt.Rows[0][0].ToString());
                    }
                    catch
                    {
                        lId = 0;
                    }
                }

                ObjDt.Dispose();
            }

            if (lId == 0)
            {
                ClsFunctions.FxMessage(1, "Registro no pudo ser guardado");
            }

            return(lId);
        }
        public static long Fx_upt_tblUser_resetPassword(long pUserId)
        {
            long lUserId = 0;

            object[][] lParameters = new object[2][];

            lParameters[0] = new object[] { "UserId", "Password" };
            lParameters[1] = new object[] { pUserId, "centuria" };

            DataTable ObjDt = ClsConnection.FxSqlExecute(ClsVariables.gDatabaseCore, "Administrator", "sp_upt_tblUser_password", lParameters);

            if (ObjDt != null)
            {
                if (ObjDt.Rows.Count > 0)
                {
                    try
                    {
                        lUserId = long.Parse(ObjDt.Rows[0][0].ToString());
                    }
                    catch
                    {
                        lUserId = 0;
                    }
                }

                ObjDt.Dispose();
            }

            return(lUserId);
        }
        internal static Bitmap FxSqlImage(string pDatabase, string pSchema, string pStoredProcedure, object[][] pParameters)
        {
            DataTable ObjDt = ClsConnection.FxSqlExecute(pDatabase, pSchema, pStoredProcedure, pParameters);

            if (ObjDt != null)
            {
                if (ObjDt.Rows.Count > 0)
                {
                    byte[] ObjBuffer = (byte[])ObjDt.Rows[0][0];

                    MemoryStream ObjStream = new MemoryStream(ObjBuffer);

                    Bitmap ObjImage = new Bitmap(ObjStream);

                    ObjStream.Close();
                    ObjStream.Dispose();

                    return(ObjImage);
                }
                else
                {
                    ObjDt.Dispose();

                    return(null);
                }
            }
            else
            {
                return(null);
            }
        }
示例#5
0
        public static DataTable Fx_sel_tblCurrency_detail(long pCurrencyId)
        {
            object[][] lParameters = new object[2][];

            lParameters[0] = new object[] { "CurrencyId" };
            lParameters[1] = new object[] { pCurrencyId };

            DataTable ObjDt = ClsConnection.FxSqlExecute(ClsVariables.gDatabaseCore, lSchema, "sp_sel_tblCurrency_detail", lParameters);

            return(ObjDt);
        }
示例#6
0
        public static DataTable Fx_sel_tblCurrency(bool pEnabled)
        {
            object[][] lParameters = new object[2][];

            lParameters[0] = new object[] { "Enabled" };
            lParameters[1] = new object[] { pEnabled };

            DataTable ObjDt = ClsConnection.FxSqlExecute(ClsVariables.gDatabaseCore, lSchema, "sp_sel_tblCurrency", lParameters);

            return(ObjDt);
        }
示例#7
0
        public static long Fx_upt_tblCurrency(long pCurrencyId, string pName, string pIsoCode, string pSymbol, bool pEnabled)
        {
            long lId = 0;

            object[][] lParameters = new object[2][];

            lParameters[0] = new object[] { "CurrencyId", "Name", "IsoCode", "Symbol", "Enabled" };
            lParameters[1] = new object[] { pCurrencyId, pName, pIsoCode, pSymbol, pEnabled };

            DataTable ObjDt = ClsConnection.FxSqlExecute(ClsVariables.gDatabaseCore, lSchema, "sp_upt_tblCurrency", lParameters);

            if (ObjDt != null)
            {
                if (ObjDt.Rows.Count > 0)
                {
                    try
                    {
                        lId = long.Parse(ObjDt.Rows[0][0].ToString());
                    }
                    catch
                    {
                        lId = 0;
                    }
                }

                ObjDt.Dispose();
            }

            if (lId == 0)
            {
                ClsFunctions.FxMessage(1, "Registro no pudo ser guardado");
            }
            else
            {
                ClsFunctions.FxMessage("Proceso concluido");
            }

            return(lId);
        }
示例#8
0
        public static long Fx_ins_tblLanguage(string pName)
        {
            long lId = 0;

            object[][] lParameters = new object[2][];

            lParameters[0] = new object[] { "Name" };
            lParameters[1] = new object[] { pName };

            DataTable ObjDt = ClsConnection.FxSqlExecute(ClsVariables.gDatabaseCore, lSchema, "sp_ins_tblLanguage", lParameters);

            if (ObjDt != null)
            {
                if (ObjDt.Rows.Count > 0)
                {
                    try
                    {
                        lId = long.Parse(ObjDt.Rows[0][0].ToString());
                    }
                    catch
                    {
                        lId = 0;
                    }
                }

                ObjDt.Dispose();
            }

            if (lId == 0)
            {
                ClsFunctions.FxMessage(1, "Registro no pudo ser guardado");
            }
            else
            {
                ClsFunctions.FxMessage("Proceso concluido");
            }

            return(lId);
        }