//*******COPY IT TO USE BELOW FUNCTION - INSERT************
//try
//{
//    LIBtblmstPerformance objLIBtblmstPerformance = new LIBtblmstPerformance();
//    DALtblmstPerformance objDALtblmstPerformance = new DALtblmstPerformance();
//    MyCLS.TransportationPacket tp = new MyCLS.TransportationPacket();

//    objLIBtblmstPerformance.id = txt.Text;
//    objLIBtblmstPerformance.orgid = txt.Text;
//    objLIBtblmstPerformance.LatestPerformance = txt.Text;
//    objLIBtblmstPerformance.PerLevel = txt.Text;
//    tp.MessagePacket = objLIBtblmstPerformance;
//    tp = objDALtblmstPerformance.InserttblmstPerformance(tp);

//    if(tp.MessageId > -1)
//{
//        string[] strOutParamValues = (string[])tp.MessageResultset;
//        MessageBox.Show(strOutParamValues[0].ToString());
//    }
//    }
//catch(Exception ex)
//{
//    MyCLS.clsHandleException.HandleEx(ex, System.Reflection.MethodBase.GetCurrentMethod().ToString(), true);
//}

/// <summary>
/// Accepts=Packet, Return=Packet, Result=Packet.MessageId, Return Values=Packet.MessageResultset
/// </summary>
/// <param name="Packet"></param>
/// <returns></returns>
/// <remarks></remarks>
        public MyCLS.TransportationPacket InserttblmstPerformance(MyCLS.TransportationPacket Packet)
        {
            String[]            strOutParamValues = new String[10];
            List <SqlParameter> objParamList      = new List <SqlParameter>();
            List <SqlParameter> objParamListOut   = new List <SqlParameter>();

            MyCLS.clsExecuteStoredProcSql clsESPSql = new MyCLS.clsExecuteStoredProcSql();
            int Result = 0;

            try
            {
                LIBtblmstPerformance objLIBtblmstPerformance = new LIBtblmstPerformance();
                objLIBtblmstPerformance = (LIBtblmstPerformance)Packet.MessagePacket;

                objParamList.Add(new SqlParameter("@id", objLIBtblmstPerformance.id));
                objParamList.Add(new SqlParameter("@orgid", objLIBtblmstPerformance.orgid));
                objParamList.Add(new SqlParameter("@LatestPerformance", objLIBtblmstPerformance.LatestPerformance));
                objParamList.Add(new SqlParameter("@PerLevel", objLIBtblmstPerformance.PerLevel));
                objParamListOut.Add(new SqlParameter("@@id", SqlDbType.Int));
                strOutParamValues       = clsESPSql.ExecuteSPNonQueryOutPut("SP_InserttblmstPerformance", objParamList, objParamListOut, ref Result);
                Packet.MessageId        = Result;
                Packet.MessageResultset = strOutParamValues;
            }
            catch (Exception ex)
            {
                Packet.MessageId = -1;
                Packet.ex        = ex;
                MyCLS.clsHandleException.HandleEx(ex, System.Reflection.MethodBase.GetCurrentMethod().ToString(), true);
            }
            return(Packet);
        }
//*******COPY IT TO USE BELOW FUNCTION - INSERT************
//try
//{
//    LIBtblmstContact objLIBtblmstContact = new LIBtblmstContact();
//    DALtblmstContact objDALtblmstContact = new DALtblmstContact();
//    MyCLS.TransportationPacket tp = new MyCLS.TransportationPacket();

//    objLIBtblmstContact.id = txt.Text;
//    objLIBtblmstContact.Name = txt.Text;
//    objLIBtblmstContact.Email = txt.Text;
//    objLIBtblmstContact.phone = txt.Text;
//    objLIBtblmstContact.designation = txt.Text;
//    objLIBtblmstContact.OrgName = txt.Text;
//    objLIBtblmstContact.dt = txt.Text;
//    tp.MessagePacket = objLIBtblmstContact;
//    tp = objDALtblmstContact.InserttblmstContact(tp);

//    if(tp.MessageId > -1)
//{
//        string[] strOutParamValues = (string[])tp.MessageResultset;
//        MessageBox.Show(strOutParamValues[0].ToString());
//    }
//    }
//catch(Exception ex)
//{
//    MyCLS.clsHandleException.HandleEx(ex, System.Reflection.MethodBase.GetCurrentMethod().ToString(), true);
//}

/// <summary>
/// Accepts=Packet, Return=Packet, Result=Packet.MessageId, Return Values=Packet.MessageResultset
/// </summary>
/// <param name="Packet"></param>
/// <returns></returns>
/// <remarks></remarks>
        public MyCLS.TransportationPacket InserttblmstContact(MyCLS.TransportationPacket Packet)
        {
            String[]            strOutParamValues = new String[10];
            List <SqlParameter> objParamList      = new List <SqlParameter>();
            List <SqlParameter> objParamListOut   = new List <SqlParameter>();

            MyCLS.clsExecuteStoredProcSql clsESPSql = new MyCLS.clsExecuteStoredProcSql();
            int Result = 0;

            try
            {
                LIBtblmstContact objLIBtblmstContact = new LIBtblmstContact();
                objLIBtblmstContact = (LIBtblmstContact)Packet.MessagePacket;

                objParamList.Add(new SqlParameter("@id", objLIBtblmstContact.id));
                objParamList.Add(new SqlParameter("@Name", objLIBtblmstContact.Name));
                objParamList.Add(new SqlParameter("@Email", objLIBtblmstContact.Email));
                objParamList.Add(new SqlParameter("@phone", objLIBtblmstContact.phone));
                objParamList.Add(new SqlParameter("@designation", objLIBtblmstContact.designation));
                objParamList.Add(new SqlParameter("@OrgName", objLIBtblmstContact.OrgName));
                objParamList.Add(new SqlParameter("@INTREST", objLIBtblmstContact.INTREST));
                objParamList.Add(new SqlParameter("@dt", objLIBtblmstContact.dt));
                objParamListOut.Add(new SqlParameter("@@id", SqlDbType.Int));
                strOutParamValues       = clsESPSql.ExecuteSPNonQueryOutPut("SP_InserttblmstContact", objParamList, objParamListOut, ref Result);
                Packet.MessageId        = Result;
                Packet.MessageResultset = strOutParamValues;
            }
            catch (Exception ex)
            {
                Packet.MessageId = -1;
                Packet.ex        = ex;
                MyCLS.clsHandleException.HandleEx(ex, System.Reflection.MethodBase.GetCurrentMethod().ToString(), true);
            }
            return(Packet);
        }
Пример #3
0
//*******COPY IT TO USE BELOW FUNCTION - INSERT************
//try
//{
//    LIBtblOrgNatureofBussiness objLIBtblOrgNatureofBussiness = new LIBtblOrgNatureofBussiness();
//    DALtblOrgNatureofBussiness objDALtblOrgNatureofBussiness = new DALtblOrgNatureofBussiness();
//    MyCLS.TransportationPacket tp = new MyCLS.TransportationPacket();

//    objLIBtblOrgNatureofBussiness.id = txt.Text;
//    objLIBtblOrgNatureofBussiness.orgid = txt.Text;
//    objLIBtblOrgNatureofBussiness.natureid = txt.Text;
//    objLIBtblOrgNatureofBussiness.createdBy = txt.Text;
//    objLIBtblOrgNatureofBussiness.dt = txt.Text;
//    tp.MessagePacket = objLIBtblOrgNatureofBussiness;
//    tp = objDALtblOrgNatureofBussiness.InserttblOrgNatureofBussiness(tp);

//    if(tp.MessageId > -1)
//{
//        string[] strOutParamValues = (string[])tp.MessageResultset;
//        MessageBox.Show(strOutParamValues[0].ToString());
//    }
//    }
//catch(Exception ex)
//{
//    MyCLS.clsHandleException.HandleEx(ex, System.Reflection.MethodBase.GetCurrentMethod().ToString(), true);
//}

/// <summary>
/// Accepts=Packet, Return=Packet, Result=Packet.MessageId, Return Values=Packet.MessageResultset
/// </summary>
/// <param name="Packet"></param>
/// <returns></returns>
/// <remarks></remarks>
        public MyCLS.TransportationPacket InserttblOrgNatureofBussiness(MyCLS.TransportationPacket Packet)
        {
            String[]            strOutParamValues = new String[10];
            List <SqlParameter> objParamList      = new List <SqlParameter>();
            List <SqlParameter> objParamListOut   = new List <SqlParameter>();

            MyCLS.clsExecuteStoredProcSql clsESPSql = new MyCLS.clsExecuteStoredProcSql();
            int Result = 0;

            try
            {
                LIBtblOrgNatureofBussiness objLIBtblOrgNatureofBussiness = new LIBtblOrgNatureofBussiness();
                objLIBtblOrgNatureofBussiness = (LIBtblOrgNatureofBussiness)Packet.MessagePacket;

                objParamList.Add(new SqlParameter("@id", objLIBtblOrgNatureofBussiness.id));
                objParamList.Add(new SqlParameter("@orgid", objLIBtblOrgNatureofBussiness.orgid));
                objParamList.Add(new SqlParameter("@natureid", objLIBtblOrgNatureofBussiness.natureid));
                objParamList.Add(new SqlParameter("@createdBy", objLIBtblOrgNatureofBussiness.createdBy));
                objParamList.Add(new SqlParameter("@dt", objLIBtblOrgNatureofBussiness.dt));
                objParamListOut.Add(new SqlParameter("@@id", SqlDbType.Int));
                strOutParamValues       = clsESPSql.ExecuteSPNonQueryOutPut("SP_InserttblOrgNatureofBussiness", objParamList, objParamListOut, ref Result);
                Packet.MessageId        = Result;
                Packet.MessageResultset = strOutParamValues;
            }
            catch (Exception ex)
            {
                Packet.MessageId = -1;
                Packet.ex        = ex;
                MyCLS.clsHandleException.HandleEx(ex, System.Reflection.MethodBase.GetCurrentMethod().ToString(), true);
            }
            return(Packet);
        }
//*******COPY IT TO USE BELOW FUNCTION - INSERT************
//try
//{
//    LIBtblmstInstruction objLIBtblmstInstruction = new LIBtblmstInstruction();
//    DALtblmstInstruction objDALtblmstInstruction = new DALtblmstInstruction();
//    MyCLS.TransportationPacket tp = new MyCLS.TransportationPacket();

//    objLIBtblmstInstruction.ID = txt.Text;
//    objLIBtblmstInstruction.DOb/Age = txt.Text;
//    objLIBtblmstInstruction.currency = txt.Text;
//    tp.MessagePacket = objLIBtblmstInstruction;
//    tp = objDALtblmstInstruction.InserttblmstInstruction(tp);

//    if(tp.MessageId > -1)
//{
//        string[] strOutParamValues = (string[])tp.MessageResultset;
//        MessageBox.Show(strOutParamValues[0].ToString());
//    }
//    }
//catch(Exception ex)
//{
//    MyCLS.clsHandleException.HandleEx(ex, System.Reflection.MethodBase.GetCurrentMethod().ToString(), true);
//}

/// <summary>
/// Accepts=Packet, Return=Packet, Result=Packet.MessageId, Return Values=Packet.MessageResultset
/// </summary>
/// <param name="Packet"></param>
/// <returns></returns>
/// <remarks></remarks>
        public MyCLS.TransportationPacket InserttblmstInstruction(MyCLS.TransportationPacket Packet)
        {
            String[]            strOutParamValues = new String[10];
            List <SqlParameter> objParamList      = new List <SqlParameter>();
            List <SqlParameter> objParamListOut   = new List <SqlParameter>();

            MyCLS.clsExecuteStoredProcSql clsESPSql = new MyCLS.clsExecuteStoredProcSql();
            int Result = 0;

            try
            {
                LIBtblmstInstruction objLIBtblmstInstruction = new LIBtblmstInstruction();
                objLIBtblmstInstruction = (LIBtblmstInstruction)Packet.MessagePacket;

                objParamList.Add(new SqlParameter("@ID", objLIBtblmstInstruction.ID));
                objParamList.Add(new SqlParameter("@DOB", objLIBtblmstInstruction.DOb_Age));
                objParamList.Add(new SqlParameter("@currency", objLIBtblmstInstruction.currency));
                objParamListOut.Add(new SqlParameter("@@ID", SqlDbType.Int));
                strOutParamValues       = clsESPSql.ExecuteSPNonQueryOutPut("SP_InserttblmstInstruction", objParamList, objParamListOut, ref Result);
                Packet.MessageId        = Result;
                Packet.MessageResultset = strOutParamValues;
            }
            catch (Exception ex)
            {
                Packet.MessageId = -1;
                Packet.ex        = ex;
                MyCLS.clsHandleException.HandleEx(ex, System.Reflection.MethodBase.GetCurrentMethod().ToString(), true);
            }
            return(Packet);
        }
Пример #5
0
//*******COPY IT TO USE BELOW FUNCTION - INSERT************
//try
//{
//    LIBtblmstEmployee objLIBtblmstEmployee = new LIBtblmstEmployee();
//    DALtblmstEmployee objDALtblmstEmployee = new DALtblmstEmployee();
//    MyCLS.TransportationPacket tp = new MyCLS.TransportationPacket();

//    objLIBtblmstEmployee.ID = txt.Text;
//    objLIBtblmstEmployee.EmpID = txt.Text;
//    objLIBtblmstEmployee.DOb = txt.Text;
//    objLIBtblmstEmployee.Age = txt.Text;
//    objLIBtblmstEmployee.DOJ = txt.Text;
//    objLIBtblmstEmployee.Gender = txt.Text;
//    objLIBtblmstEmployee.Dept = txt.Text;
//    objLIBtblmstEmployee.Desig = txt.Text;
//    objLIBtblmstEmployee.Grade = txt.Text;
//    objLIBtblmstEmployee.Managerid = txt.Text;
//    objLIBtblmstEmployee.LatestPerformance = txt.Text;
//    objLIBtblmstEmployee.LastPromotion = txt.Text;
//    objLIBtblmstEmployee.Grosspay = txt.Text;
//    objLIBtblmstEmployee.currency = txt.Text;
//    objLIBtblmstEmployee.createdBy = txt.Text;
//    objLIBtblmstEmployee.dt = txt.Text;
//    objLIBtblmstEmployee.fYear = txt.Text;
//    tp.MessagePacket = objLIBtblmstEmployee;
//    tp = objDALtblmstEmployee.InserttblmstEmployee(tp);

//    if(tp.MessageId > -1)
//{
//        string[] strOutParamValues = (string[])tp.MessageResultset;
//        MessageBox.Show(strOutParamValues[0].ToString());
//    }
//    }
//catch(Exception ex)
//{
//    MyCLS.clsHandleException.HandleEx(ex, System.Reflection.MethodBase.GetCurrentMethod().ToString(), true);
//}

/// <summary>
/// Accepts=Packet, Return=Packet, Result=Packet.MessageId, Return Values=Packet.MessageResultset
/// </summary>
/// <param name="Packet"></param>
/// <returns></returns>
/// <remarks></remarks>
        public MyCLS.TransportationPacket InserttblmstEmployee(MyCLS.TransportationPacket Packet)
        {
            String[]            strOutParamValues = new String[10];
            List <SqlParameter> objParamList      = new List <SqlParameter>();
            List <SqlParameter> objParamListOut   = new List <SqlParameter>();

            MyCLS.clsExecuteStoredProcSql clsESPSql = new MyCLS.clsExecuteStoredProcSql();
            int Result = 0;

            try
            {
                LIBtblmstEmployee objLIBtblmstEmployee = new LIBtblmstEmployee();
                objLIBtblmstEmployee = (LIBtblmstEmployee)Packet.MessagePacket;

                objParamList.Add(new SqlParameter("@ID", objLIBtblmstEmployee.ID));
                objParamList.Add(new SqlParameter("@EmpID", objLIBtblmstEmployee.EmpID));
                objParamList.Add(new SqlParameter("@DOb", objLIBtblmstEmployee.DOb));
                objParamList.Add(new SqlParameter("@Age", objLIBtblmstEmployee.Age));
                objParamList.Add(new SqlParameter("@DOJ", objLIBtblmstEmployee.DOJ));
                objParamList.Add(new SqlParameter("@Gender", objLIBtblmstEmployee.Gender));
                objParamList.Add(new SqlParameter("@Dept", objLIBtblmstEmployee.Dept));
                objParamList.Add(new SqlParameter("@Desig", objLIBtblmstEmployee.Desig));
                objParamList.Add(new SqlParameter("@Grade", objLIBtblmstEmployee.Grade));
                objParamList.Add(new SqlParameter("@Managerid", objLIBtblmstEmployee.Managerid));
                objParamList.Add(new SqlParameter("@LatestPerformance", objLIBtblmstEmployee.LatestPerformance));
                objParamList.Add(new SqlParameter("@LastPromotion", objLIBtblmstEmployee.LastPromotion));
                objParamList.Add(new SqlParameter("@Grosspay", objLIBtblmstEmployee.Grosspay));
                objParamList.Add(new SqlParameter("@currency", objLIBtblmstEmployee.currency));
                objParamList.Add(new SqlParameter("@createdBy", objLIBtblmstEmployee.createdBy));
                objParamList.Add(new SqlParameter("@dt", objLIBtblmstEmployee.dt));
                objParamList.Add(new SqlParameter("@fYear", objLIBtblmstEmployee.fYear));
                objParamList.Add(new SqlParameter("@orgid", objLIBtblmstEmployee.OrgID));
                objParamList.Add(new SqlParameter("@status", objLIBtblmstEmployee.Status));
                objParamListOut.Add(new SqlParameter("@@ID", SqlDbType.Int));
                strOutParamValues       = clsESPSql.ExecuteSPNonQueryOutPut("SP_InserttblmstEmployee", objParamList, objParamListOut, ref Result);
                Packet.MessageId        = Result;
                Packet.MessageResultset = strOutParamValues;
            }
            catch (Exception ex)
            {
                Packet.MessageId = -1;
                Packet.ex        = ex;
                MyCLS.clsHandleException.HandleEx(ex, System.Reflection.MethodBase.GetCurrentMethod().ToString(), true);
            }
            return(Packet);
        }
Пример #6
0
//*******COPY IT TO USE BELOW FUNCTION - INSERT************
//try
//{
//    LIBtblmstOrgInfo objLIBtblmstOrgInfo = new LIBtblmstOrgInfo();
//    DALtblmstOrgInfo objDALtblmstOrgInfo = new DALtblmstOrgInfo();
//    MyCLS.TransportationPacket tp = new MyCLS.TransportationPacket();

//    objLIBtblmstOrgInfo.id = txt.Text;
//    objLIBtblmstOrgInfo.orgid = txt.Text;
//    objLIBtblmstOrgInfo.year = txt.Text;
//    objLIBtblmstOrgInfo.turnover = txt.Text;
//    objLIBtblmstOrgInfo.HeadCount = txt.Text;
//    objLIBtblmstOrgInfo.Profit = txt.Text;
//    objLIBtblmstOrgInfo.WageBill = txt.Text;
//    objLIBtblmstOrgInfo.Attrtion = txt.Text;
//    objLIBtblmstOrgInfo.createdBy = txt.Text;
//    objLIBtblmstOrgInfo.dt = txt.Text;
//    tp.MessagePacket = objLIBtblmstOrgInfo;
//    tp = objDALtblmstOrgInfo.InserttblmstOrgInfo(tp);

//    if(tp.MessageId > -1)
//{
//        string[] strOutParamValues = (string[])tp.MessageResultset;
//        MessageBox.Show(strOutParamValues[0].ToString());
//    }
//    }
//catch(Exception ex)
//{
//    MyCLS.clsHandleException.HandleEx(ex, System.Reflection.MethodBase.GetCurrentMethod().ToString(), true);
//}

/// <summary>
/// Accepts=Packet, Return=Packet, Result=Packet.MessageId, Return Values=Packet.MessageResultset
/// </summary>
/// <param name="Packet"></param>
/// <returns></returns>
/// <remarks></remarks>
        public MyCLS.TransportationPacket InserttblmstOrgInfo(MyCLS.TransportationPacket Packet)
        {
            String[]            strOutParamValues = new String[10];
            List <SqlParameter> objParamList      = new List <SqlParameter>();
            List <SqlParameter> objParamListOut   = new List <SqlParameter>();

            MyCLS.clsExecuteStoredProcSql clsESPSql = new MyCLS.clsExecuteStoredProcSql();
            int Result = 0;

            try
            {
                LIBtblmstOrgInfo objLIBtblmstOrgInfo = new LIBtblmstOrgInfo();
                objLIBtblmstOrgInfo = (LIBtblmstOrgInfo)Packet.MessagePacket;

                objParamList.Add(new SqlParameter("@id", objLIBtblmstOrgInfo.id));
                objParamList.Add(new SqlParameter("@orgid", objLIBtblmstOrgInfo.orgid));
                objParamList.Add(new SqlParameter("@year", objLIBtblmstOrgInfo.year));
                objParamList.Add(new SqlParameter("@turnover", objLIBtblmstOrgInfo.turnover));
                objParamList.Add(new SqlParameter("@HeadCount", objLIBtblmstOrgInfo.HeadCount));
                objParamList.Add(new SqlParameter("@Profit", objLIBtblmstOrgInfo.Profit));
                objParamList.Add(new SqlParameter("@WageBill", objLIBtblmstOrgInfo.WageBill));
                objParamList.Add(new SqlParameter("@Attrtion", objLIBtblmstOrgInfo.Attrtion));
                objParamList.Add(new SqlParameter("@createdBy", objLIBtblmstOrgInfo.createdBy));
                objParamList.Add(new SqlParameter("@dt", objLIBtblmstOrgInfo.dt));
                objParamList.Add(new SqlParameter("@Currency", objLIBtblmstOrgInfo.Currency));
                objParamList.Add(new SqlParameter("@industry", objLIBtblmstOrgInfo.Industry));
                objParamListOut.Add(new SqlParameter("@@id", SqlDbType.Int));
                strOutParamValues       = clsESPSql.ExecuteSPNonQueryOutPut("SP_InserttblmstOrgInfo", objParamList, objParamListOut, ref Result);
                Packet.MessageId        = Result;
                Packet.MessageResultset = strOutParamValues;
            }
            catch (Exception ex)
            {
                Packet.MessageId = -1;
                Packet.ex        = ex;
                MyCLS.clsHandleException.HandleEx(ex, System.Reflection.MethodBase.GetCurrentMethod().ToString(), true);
            }
            return(Packet);
        }
Пример #7
0
        //*******COPY IT TO USE BELOW FUNCTION - INSERT************
        //try
        //{
        //    LIBErLog objLIBErLog = new LIBErLog();
        //    DALErLog objDALErLog = new DALErLog();
        //    TransportationPacket tp = new TransportationPacket();

        //    objLIBErLog.Id = txt.Text;
        //    objLIBErLog.Dt = txt.Text;
        //    objLIBErLog.StackTrace = txt.Text;
        //    objLIBErLog.MethodName = txt.Text;
        //    objLIBErLog.Username = txt.Text;
        //    objLIBErLog.Msg = txt.Text;
        //    objLIBErLog.Source = txt.Text;
        //    objLIBErLog.TargetSite = txt.Text;
        //    objLIBErLog.Data = txt.Text;
        //    objLIBErLog.FullMsg = txt.Text;
        //    tp.MessagePacket = objLIBErLog;
        //    tp = objDALErLog.InsertErLog(tp);

        //    if(tp.MessageId > -1)
        //{
        //        string[] strOutParamValues = (string[])tp.MessageResultset;
        //        MessageBox.Show(strOutParamValues[0].ToString());
        //    }
        //    }
        //catch(Exception ex)
        //{
        //    MessageBox.Show(ex.Message);
        //}

        /// <summary>
        /// Accepts=Packet, Return=Packet, Result=Packet.MessageId, Return Values=Packet.MessageResultset
        /// </summary>
        /// <param name="Packet"></param>
        /// <returns></returns>
        /// <remarks></remarks>
        public TransportationPacket InsertErLog(TransportationPacket Packet)
        {
            String[]                strOutParamValues = new String[10];
            List <SqlParameter>     objParamList      = new List <SqlParameter>();
            List <SqlParameter>     objParamListOut   = new List <SqlParameter>();
            clsExecuteStoredProcSql clsESPSql         = new clsExecuteStoredProcSql();
            int Result = 0;

            try
            {
                LIBErLog objLIBErLog = new LIBErLog();
                objLIBErLog = (LIBErLog)Packet.MessagePacket;

                objParamList.Add(new SqlParameter("@Id", objLIBErLog.Id));
                //objParamList.Add(new SqlParameter("@Dt", objLIBErLog.Dt));
                objParamList.Add(new SqlParameter("@StackTrace", objLIBErLog.StackTrace));
                objParamList.Add(new SqlParameter("@MethodName", objLIBErLog.MethodName));
                objParamList.Add(new SqlParameter("@Username", objLIBErLog.Username));
                objParamList.Add(new SqlParameter("@Msg", objLIBErLog.Msg));
                objParamList.Add(new SqlParameter("@Source", objLIBErLog.Source));
                objParamList.Add(new SqlParameter("@TargetSite", objLIBErLog.TargetSite));
                objParamList.Add(new SqlParameter("@Data", objLIBErLog.Data));
                objParamList.Add(new SqlParameter("@InnerEx", objLIBErLog.InnerEx));
                objParamList.Add(new SqlParameter("@FullMsg", objLIBErLog.FullMsg));
                objParamListOut.Add(new SqlParameter("@@Id", SqlDbType.Int));
                //strOutParamValues = clsESPSql.ExecuteSPNonQueryOutPut("SP_InsertErLog", objParamList, objParamListOut);
                strOutParamValues = clsESPSql.ExecuteSPNonQueryOutPut("SP_InsertErLog", objParamList, objParamListOut, ref Result);
                //Result = clsESPSql.ExecuteSPNonQuery("SP_InsertErLog", objParamList);
                Packet.MessageId        = Result;
                Packet.MessageResultset = strOutParamValues;
            }
            catch (Exception ex)
            {
                Packet.MessageId = -1;
                clsHandleException.HandleEx(ex, System.Reflection.MethodBase.GetCurrentMethod().ToString(), false);
            }
            return(Packet);
        }
Пример #8
0
//*******COPY IT TO USE BELOW FUNCTION - INSERT************
//try
//{
//    LIBtblmstBenchmark objLIBtblmstBenchmark = new LIBtblmstBenchmark();
//    DALtblmstBenchmark objDALtblmstBenchmark = new DALtblmstBenchmark();
//    MyCLS.TransportationPacket tp = new MyCLS.TransportationPacket();

//    objLIBtblmstBenchmark.id = txt.Text;
//    objLIBtblmstBenchmark.industryid = txt.Text;
//    objLIBtblmstBenchmark.bm1_1 = txt.Text;
//    objLIBtblmstBenchmark.bm1_2 = txt.Text;
//    objLIBtblmstBenchmark.bm2_1 = txt.Text;
//    objLIBtblmstBenchmark.bm2_2 = txt.Text;
//    objLIBtblmstBenchmark.bm3_1 = txt.Text;
//    objLIBtblmstBenchmark.bm3_2 = txt.Text;
//    objLIBtblmstBenchmark.currency = txt.Text;
//    tp.MessagePacket = objLIBtblmstBenchmark;
//    tp = objDALtblmstBenchmark.InserttblmstBenchmark(tp);

//    if(tp.MessageId > -1)
//{
//        string[] strOutParamValues = (string[])tp.MessageResultset;
//        MessageBox.Show(strOutParamValues[0].ToString());
//    }
//    }
//catch(Exception ex)
//{
//    MyCLS.clsHandleException.HandleEx(ex, System.Reflection.MethodBase.GetCurrentMethod().ToString(), true);
//}

/// <summary>
/// Accepts=Packet, Return=Packet, Result=Packet.MessageId, Return Values=Packet.MessageResultset
/// </summary>
/// <param name="Packet"></param>
/// <returns></returns>
/// <remarks></remarks>
        public MyCLS.TransportationPacket InserttblmstBenchmark(MyCLS.TransportationPacket Packet)
        {
            String[]            strOutParamValues = new String[10];
            List <SqlParameter> objParamList      = new List <SqlParameter>();
            List <SqlParameter> objParamListOut   = new List <SqlParameter>();

            MyCLS.clsExecuteStoredProcSql clsESPSql = new MyCLS.clsExecuteStoredProcSql();
            int Result = 0;

            try
            {
                LIBtblmstBenchmark objLIBtblmstBenchmark = new LIBtblmstBenchmark();
                objLIBtblmstBenchmark = (LIBtblmstBenchmark)Packet.MessagePacket;

                objParamList.Add(new SqlParameter("@id", objLIBtblmstBenchmark.id));
                objParamList.Add(new SqlParameter("@industryid", objLIBtblmstBenchmark.industryid));
                objParamList.Add(new SqlParameter("@bm1_1", objLIBtblmstBenchmark.bm1_1));
                objParamList.Add(new SqlParameter("@bm1_2", objLIBtblmstBenchmark.bm1_2));
                objParamList.Add(new SqlParameter("@bm2_1", objLIBtblmstBenchmark.bm2_1));
                objParamList.Add(new SqlParameter("@bm2_2", objLIBtblmstBenchmark.bm2_2));
                objParamList.Add(new SqlParameter("@bm3_1", objLIBtblmstBenchmark.bm3_1));
                objParamList.Add(new SqlParameter("@bm3_2", objLIBtblmstBenchmark.bm3_2));
                objParamList.Add(new SqlParameter("@currency", objLIBtblmstBenchmark.currency));
                objParamList.Add(new SqlParameter("@metric", objLIBtblmstBenchmark.metric));
                objParamListOut.Add(new SqlParameter("@@id", SqlDbType.Int));
                strOutParamValues       = clsESPSql.ExecuteSPNonQueryOutPut("SP_InserttblmstBenchmark", objParamList, objParamListOut, ref Result);
                Packet.MessageId        = Result;
                Packet.MessageResultset = strOutParamValues;
            }
            catch (Exception ex)
            {
                Packet.MessageId = -1;
                Packet.ex        = ex;
                MyCLS.clsHandleException.HandleEx(ex, System.Reflection.MethodBase.GetCurrentMethod().ToString(), true);
            }
            return(Packet);
        }