public static int AddLayOutMgr(LayoutMgrInfo obj) { try { OracleConnection SQLConn = new OracleConnection(SystemSetting.SageFrameConnectionString); //SqlConnection SQLConn = new SqlConnection(SystemSetting.SageFrameConnectionString); //SqlCommand SQLCmd = new SqlCommand(); OracleCommand SQLCmd = new OracleCommand(); int ReturnValue = -1; SQLCmd.Connection = SQLConn; SQLCmd.CommandText = "usp_AddModulesOrder"; SQLCmd.CommandType = CommandType.StoredProcedure; SQLCmd.Parameters.Add(new OracleParameter("ModuleOrder", obj.ModuleOrder)); SQLCmd.Parameters.Add(new OracleParameter("PortelID", obj.PortelID)); SQLCmd.Parameters.Add(new OracleParameter("ModuleID", obj.ModuleID)); SQLCmd.Parameters.Add(new OracleParameter("ModuleName", obj.ModuleName)); SQLCmd.Parameters.Add(new OracleParameter("PaneName", obj.PaneName)); SQLCmd.Parameters.Add(new OracleParameter("UserModuleID", obj.UserModuleID)); SQLCmd.Parameters.Add(new OracleParameter("NewModuleID", OracleDbType.Int32)); SQLCmd.Parameters["NewModuleID"].Direction = ParameterDirection.Output; SQLConn.Open(); SQLCmd.ExecuteNonQuery(); ReturnValue = (int)SQLCmd.Parameters["NewModuleID"].Value; return(ReturnValue); } catch (Exception e) { throw e; } }
public static int AddLayOutMgr(LayoutMgrInfo obj) { try { SqlConnection SQLConn = new SqlConnection(SystemSetting.SageFrameConnectionString); SqlCommand SQLCmd = new SqlCommand(); int ReturnValue = -1; SQLCmd.Connection = SQLConn; SQLCmd.CommandText = "[dbo].[usp_AddModulesOrder]"; SQLCmd.CommandType = CommandType.StoredProcedure; SQLCmd.Parameters.Add(new SqlParameter("@ModuleOrder", obj.ModuleOrder)); SQLCmd.Parameters.Add(new SqlParameter("@PortelID", obj.PortelID)); SQLCmd.Parameters.Add(new SqlParameter("@ModuleID", obj.ModuleID)); SQLCmd.Parameters.Add(new SqlParameter("@ModuleName", obj.ModuleName)); SQLCmd.Parameters.Add(new SqlParameter("@PaneName", obj.PaneName)); SQLCmd.Parameters.Add(new SqlParameter("@UserModuleID", obj.UserModuleID)); SQLCmd.Parameters.Add(new SqlParameter("@NewModuleID", SqlDbType.Int)); SQLCmd.Parameters["@NewModuleID"].Direction = ParameterDirection.Output; SQLConn.Open(); SQLCmd.ExecuteNonQuery(); ReturnValue = (int)SQLCmd.Parameters["@NewModuleID"].Value; return ReturnValue; } catch (Exception e) { throw e; } }
public static int AddUserModule(LayoutMgrInfo layout) { return (LayoutMgrDataProvider.AddLayOutMgr(layout)); }