コード例 #1
0
//*******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);
        }
コード例 #2
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);
        }
コード例 #3
0
//*******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);
        }
コード例 #4
0
//*******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 - SELECT BY ID************
//try
//{
//    LIBtblmstOrgInfoListing objLIBtblmstOrgInfoListing = new LIBtblmstOrgInfoListing();
//    DALtblmstOrgInfo objDALtblmstOrgInfo = new DALtblmstOrgInfo();
//    MyCLS.TransportationPacket tp = new MyCLS.TransportationPacket();
//    DataSet ds = new DataSet();

////  txt.Text = objLIBtblmstOrgInfoListing[0].id = "";
////  txt.Text = objLIBtblmstOrgInfoListing[0].orgid = "";
////  txt.Text = objLIBtblmstOrgInfoListing[0].year = "";
////  txt.Text = objLIBtblmstOrgInfoListing[0].turnover = "";
////  txt.Text = objLIBtblmstOrgInfoListing[0].HeadCount = "";
////  txt.Text = objLIBtblmstOrgInfoListing[0].Profit = "";
////  txt.Text = objLIBtblmstOrgInfoListing[0].WageBill = "";
////  txt.Text = objLIBtblmstOrgInfoListing[0].Attrtion = "";
////  txt.Text = objLIBtblmstOrgInfoListing[0].createdBy = "";
////  txt.Text = objLIBtblmstOrgInfoListing[0].dt = "";
//    tp.MessagePacket = 1;    //ID to be Passed

//    tp = objDALtblmstOrgInfo.GettblmstOrgInfoDetails(tp);
//    if(tp.MessageId == 1)
//{
//        objLIBtblmstOrgInfoListing = (LIBtblmstOrgInfoListing)tp.MessageResultset;
//        ds = (DataSet)tp.MessageResultsetDS;
//        MessageBox.Show(objLIBtblmstOrgInfoListing[0].ToString());
//    }
//    }
//catch(Exception ex)
//    {
//    MyCLS.clsHandleException.HandleEx(ex, System.Reflection.MethodBase.GetCurrentMethod().ToString(), true);
//    }

/// <summary>
/// Accepts=TransportationPacket, Return=Packet, Result=Packet.MessageId, Return Values=Packet.MessageResultset
/// </summary>
/// <returns></returns>
/// <remarks></remarks>
        public MyCLS.TransportationPacket GettblmstOrgInfoDetails(MyCLS.TransportationPacket Packet)
        {
            DataSet                 ds           = new DataSet();
            List <SqlParameter>     objParamList = new List <SqlParameter>();
            LIBtblmstOrgInfoListing objLIBtblmstOrgInfoListing = new LIBtblmstOrgInfoListing();

            MyCLS.clsExecuteStoredProcSql clsESPSql = new MyCLS.clsExecuteStoredProcSql();

            try
            {
                objParamList.Add(new SqlParameter("@Id", Packet.MessagePacket));
                ds = clsESPSql.ExecuteSPDataSet("SP_GetDetailsFromtblmstOrgInfoById", objParamList);
                if (ds != null)
                {
                    if (ds.Tables != null)
                    {
                        if (ds.Tables[0].Rows != null)
                        {
                            if (ds.Tables[0].Rows.Count > 0)
                            {
                                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                                {
                                    LIBtblmstOrgInfo oLIBtblmstOrgInfo = new LIBtblmstOrgInfo();

                                    objLIBtblmstOrgInfoListing.Add(oLIBtblmstOrgInfo);
                                    objLIBtblmstOrgInfoListing[i].id        = (int)ds.Tables[0].Rows[i]["id"];
                                    objLIBtblmstOrgInfoListing[i].orgid     = (int)ds.Tables[0].Rows[i]["orgid"];
                                    objLIBtblmstOrgInfoListing[i].year      = ds.Tables[0].Rows[i]["year"].ToString();
                                    objLIBtblmstOrgInfoListing[i].turnover  = (decimal)ds.Tables[0].Rows[i]["turnover"];
                                    objLIBtblmstOrgInfoListing[i].HeadCount = (decimal)ds.Tables[0].Rows[i]["HeadCount"];
                                    objLIBtblmstOrgInfoListing[i].Profit    = (decimal)ds.Tables[0].Rows[i]["Profit"];
                                    objLIBtblmstOrgInfoListing[i].WageBill  = (decimal)ds.Tables[0].Rows[i]["WageBill"];
                                    objLIBtblmstOrgInfoListing[i].Attrtion  = (decimal)ds.Tables[0].Rows[i]["Attrtion"];
                                    objLIBtblmstOrgInfoListing[i].createdBy = ds.Tables[0].Rows[i]["createdBy"].ToString();
                                    objLIBtblmstOrgInfoListing[i].dt        = ds.Tables[0].Rows[i]["dt"].ToString();
                                }
                                Packet.MessageId = 1;
                            }
                            else
                            {
                                Packet.MessageId = -1;
                            }
                        }
                    }
                }

                Packet.MessageResultsetDS = ds;
                Packet.MessageResultset   = objLIBtblmstOrgInfoListing;
            }
            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 - SELECT BY ID************
        //try
        //{
        //    LIBErLogListing objLIBErLogListing = new LIBErLogListing();
        //    DALErLog objDALErLog = new DALErLog();
        //    TransportationPacket tp = new TransportationPacket();
        //    Dateset ds = new Dataset();
        //    tp.MessagePacket = 1;    //ID to be Passed

        ////  txt.Text = objLIBErLogListing[0].Id = "";
        ////  txt.Text = objLIBErLogListing[0].Dt = "";
        ////  txt.Text = objLIBErLogListing[0].StackTrace = "";
        ////  txt.Text = objLIBErLogListing[0].MethodName = "";
        ////  txt.Text = objLIBErLogListing[0].Username = "";
        ////  txt.Text = objLIBErLogListing[0].Msg = "";
        ////  txt.Text = objLIBErLogListing[0].Source = "";
        ////  txt.Text = objLIBErLogListing[0].TargetSite = "";
        ////  txt.Text = objLIBErLogListing[0].Data = "";
        ////  txt.Text = objLIBErLogListing[0].FullMsg = "";
        //    tp = objDALErLog.GetErLogDetails(tp);
        //    if(tp.MessageId == 1)
        //{
        //        objLIBErLogListing = (LIBErLogListing)tp.MessageResultset;
        //        ds = (Dateset)tp.MessageResultsetDS;
        //        MessageBox.Show(objLIBErLogListing[0].ToString());
        //    }
        //    }
        //catch(Exception ex)
        //    {
        //    MessageBox.Show(ex.Message);
        //    }

        /// <summary>
        /// Accepts=TransportationPacket, Return=Packet, Result=Packet.MessageId, Return Values=Packet.MessageResultset
        /// </summary>
        /// <returns></returns>
        /// <remarks></remarks>
        public TransportationPacket GetErLogDetails(TransportationPacket Packet)
        {
            DataSet                 ds                 = new DataSet();
            List <SqlParameter>     objParamList       = new List <SqlParameter>();
            LIBErLogListing         objLIBErLogListing = new LIBErLogListing();
            clsExecuteStoredProcSql clsESPSql          = new clsExecuteStoredProcSql();

            try
            {
                objParamList.Add(new SqlParameter("@Id", Packet.MessagePacket));
                ds = clsESPSql.ExecuteSPDataSet("SP_GetDetailsFromErLogById", objParamList);
                if (ds != null)
                {
                    if (ds.Tables != null)
                    {
                        if (ds.Tables[0].Rows != null)
                        {
                            if (ds.Tables[0].Rows.Count > 0)
                            {
                                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                                {
                                    LIBErLog oLIBErLog = new LIBErLog();

                                    objLIBErLogListing.Add(oLIBErLog);
                                    objLIBErLogListing[i].Id         = (int)ds.Tables[0].Rows[i]["Id"];
                                    objLIBErLogListing[i].Dt         = (DateTime)ds.Tables[0].Rows[i]["Dt"];
                                    objLIBErLogListing[i].StackTrace = ds.Tables[0].Rows[i]["StackTrace"].ToString();
                                    objLIBErLogListing[i].MethodName = ds.Tables[0].Rows[i]["MethodName"].ToString();
                                    objLIBErLogListing[i].Username   = ds.Tables[0].Rows[i]["Username"].ToString();
                                    objLIBErLogListing[i].Msg        = ds.Tables[0].Rows[i]["Msg"].ToString();
                                    objLIBErLogListing[i].Source     = ds.Tables[0].Rows[i]["Source"].ToString();
                                    objLIBErLogListing[i].TargetSite = ds.Tables[0].Rows[i]["TargetSite"].ToString();
                                    objLIBErLogListing[i].Data       = ds.Tables[0].Rows[i]["Data"].ToString();
                                    objLIBErLogListing[i].InnerEx    = ds.Tables[0].Rows[i]["InnerEx"].ToString();
                                    objLIBErLogListing[i].FullMsg    = ds.Tables[0].Rows[i]["FullMsg"].ToString();
                                }
                                Packet.MessageId = 1;
                            }
                            else
                            {
                                Packet.MessageId = -1;
                            }
                        }
                    }
                }

                Packet.MessageResultsetDS = ds;
                Packet.MessageResultset   = objLIBErLogListing;
            }
            catch (Exception ex)
            {
                Packet.MessageId = -1;
                clsHandleException.HandleEx(ex, System.Reflection.MethodBase.GetCurrentMethod().ToString(), false);
            }
            return(Packet);
        }
コード例 #7
0
//*******COPY IT TO USE BELOW FUNCTION - SELECT BY ID************
//try
//{
//    LIBtblOrgBasicInfoListing objLIBtblOrgBasicInfoListing = new LIBtblOrgBasicInfoListing();
//    DALtblOrgBasicInfo objDALtblOrgBasicInfo = new DALtblOrgBasicInfo();
//    MyCLS.TransportationPacket tp = new MyCLS.TransportationPacket();
//    DataSet ds = new DataSet();

////  txt.Text = objLIBtblOrgBasicInfoListing[0].id = "";
////  txt.Text = objLIBtblOrgBasicInfoListing[0].username = "";
////  txt.Text = objLIBtblOrgBasicInfoListing[0].Name = "";
////  txt.Text = objLIBtblOrgBasicInfoListing[0].Email = "";
////  txt.Text = objLIBtblOrgBasicInfoListing[0].phone = "";
////  txt.Text = objLIBtblOrgBasicInfoListing[0].designation = "";
////  txt.Text = objLIBtblOrgBasicInfoListing[0].OrgName = "";
////  txt.Text = objLIBtblOrgBasicInfoListing[0].industry = "";
////  txt.Text = objLIBtblOrgBasicInfoListing[0].dt = "";
//    tp.MessagePacket = 1;    //ID to be Passed

//    tp = objDALtblOrgBasicInfo.GettblOrgBasicInfoDetails(tp);
//    if(tp.MessageId == 1)
//{
//        objLIBtblOrgBasicInfoListing = (LIBtblOrgBasicInfoListing)tp.MessageResultset;
//        ds = (DataSet)tp.MessageResultsetDS;
//        MessageBox.Show(objLIBtblOrgBasicInfoListing[0].ToString());
//    }
//    }
//catch(Exception ex)
//    {
//    MyCLS.clsHandleException.HandleEx(ex, System.Reflection.MethodBase.GetCurrentMethod().ToString(), true);
//    }

/// <summary>
/// Accepts=TransportationPacket, Return=Packet, Result=Packet.MessageId, Return Values=Packet.MessageResultset
/// </summary>
/// <returns></returns>
/// <remarks></remarks>
        public MyCLS.TransportationPacket GettblOrgBasicInfoDetails(MyCLS.TransportationPacket Packet)
        {
            DataSet                   ds           = new DataSet();
            List <SqlParameter>       objParamList = new List <SqlParameter>();
            LIBtblOrgBasicInfoListing objLIBtblOrgBasicInfoListing = new LIBtblOrgBasicInfoListing();

            MyCLS.clsExecuteStoredProcSql clsESPSql = new MyCLS.clsExecuteStoredProcSql();

            try
            {
                objParamList.Add(new SqlParameter("@Id", Packet.MessagePacket));
                ds = clsESPSql.ExecuteSPDataSet("SP_GetDetailsFromtblOrgBasicInfoById", objParamList);
                if (ds != null)
                {
                    if (ds.Tables != null)
                    {
                        if (ds.Tables[0].Rows != null)
                        {
                            if (ds.Tables[0].Rows.Count > 0)
                            {
                                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                                {
                                    LIBtblOrgBasicInfo oLIBtblOrgBasicInfo = new LIBtblOrgBasicInfo();

                                    objLIBtblOrgBasicInfoListing.Add(oLIBtblOrgBasicInfo);
                                    objLIBtblOrgBasicInfoListing[i].id          = (int)ds.Tables[0].Rows[i]["id"];
                                    objLIBtblOrgBasicInfoListing[i].username    = ds.Tables[0].Rows[i]["username"].ToString();
                                    objLIBtblOrgBasicInfoListing[i].Name        = ds.Tables[0].Rows[i]["Name"].ToString();
                                    objLIBtblOrgBasicInfoListing[i].Email       = ds.Tables[0].Rows[i]["Email"].ToString();
                                    objLIBtblOrgBasicInfoListing[i].phone       = ds.Tables[0].Rows[i]["phone"].ToString();
                                    objLIBtblOrgBasicInfoListing[i].designation = ds.Tables[0].Rows[i]["designation"].ToString();
                                    objLIBtblOrgBasicInfoListing[i].OrgName     = ds.Tables[0].Rows[i]["OrgName"].ToString();
                                    objLIBtblOrgBasicInfoListing[i].industry    = ds.Tables[0].Rows[i]["industry"].ToString();
                                    objLIBtblOrgBasicInfoListing[i].dt          = ds.Tables[0].Rows[i]["dt"].ToString();
                                }
                                Packet.MessageId = 1;
                            }
                            else
                            {
                                Packet.MessageId = -1;
                            }
                        }
                    }
                }

                Packet.MessageResultsetDS = ds;
                Packet.MessageResultset   = objLIBtblOrgBasicInfoListing;
            }
            catch (Exception ex)
            {
                Packet.MessageId = -1;
                Packet.ex        = ex;
                MyCLS.clsHandleException.HandleEx(ex, System.Reflection.MethodBase.GetCurrentMethod().ToString(), true);
            }
            return(Packet);
        }
コード例 #8
0
//*******COPY IT TO USE BELOW FUNCTION - SELECT BY ID************
//try
//{
//    LIBtblmstBenchmarkListing objLIBtblmstBenchmarkListing = new LIBtblmstBenchmarkListing();
//    DALtblmstBenchmark objDALtblmstBenchmark = new DALtblmstBenchmark();
//    MyCLS.TransportationPacket tp = new MyCLS.TransportationPacket();
//    DataSet ds = new DataSet();

////  txt.Text = objLIBtblmstBenchmarkListing[0].id = "";
////  txt.Text = objLIBtblmstBenchmarkListing[0].industryid = "";
////  txt.Text = objLIBtblmstBenchmarkListing[0].bm1_1 = "";
////  txt.Text = objLIBtblmstBenchmarkListing[0].bm1_2 = "";
////  txt.Text = objLIBtblmstBenchmarkListing[0].bm2_1 = "";
////  txt.Text = objLIBtblmstBenchmarkListing[0].bm2_2 = "";
////  txt.Text = objLIBtblmstBenchmarkListing[0].bm3_1 = "";
////  txt.Text = objLIBtblmstBenchmarkListing[0].bm3_2 = "";
////  txt.Text = objLIBtblmstBenchmarkListing[0].currency = "";
//    tp.MessagePacket = 1;    //ID to be Passed

//    tp = objDALtblmstBenchmark.GettblmstBenchmarkDetails(tp);
//    if(tp.MessageId == 1)
//{
//        objLIBtblmstBenchmarkListing = (LIBtblmstBenchmarkListing)tp.MessageResultset;
//        ds = (DataSet)tp.MessageResultsetDS;
//        MessageBox.Show(objLIBtblmstBenchmarkListing[0].ToString());
//    }
//    }
//catch(Exception ex)
//    {
//    MyCLS.clsHandleException.HandleEx(ex, System.Reflection.MethodBase.GetCurrentMethod().ToString(), true);
//    }

/// <summary>
/// Accepts=TransportationPacket, Return=Packet, Result=Packet.MessageId, Return Values=Packet.MessageResultset
/// </summary>
/// <returns></returns>
/// <remarks></remarks>
        public MyCLS.TransportationPacket GettblmstBenchmarkDetails(MyCLS.TransportationPacket Packet)
        {
            DataSet                   ds           = new DataSet();
            List <SqlParameter>       objParamList = new List <SqlParameter>();
            LIBtblmstBenchmarkListing objLIBtblmstBenchmarkListing = new LIBtblmstBenchmarkListing();

            MyCLS.clsExecuteStoredProcSql clsESPSql = new MyCLS.clsExecuteStoredProcSql();

            try
            {
                objParamList.Add(new SqlParameter("@Id", Packet.MessagePacket));
                ds = clsESPSql.ExecuteSPDataSet("SP_GetDetailsFromtblmstBenchmarkById", objParamList);
                if (ds != null)
                {
                    if (ds.Tables != null)
                    {
                        if (ds.Tables[0].Rows != null)
                        {
                            if (ds.Tables[0].Rows.Count > 0)
                            {
                                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                                {
                                    LIBtblmstBenchmark oLIBtblmstBenchmark = new LIBtblmstBenchmark();

                                    objLIBtblmstBenchmarkListing.Add(oLIBtblmstBenchmark);
                                    objLIBtblmstBenchmarkListing[i].id         = (int)ds.Tables[0].Rows[i]["id"];
                                    objLIBtblmstBenchmarkListing[i].industryid = (int)ds.Tables[0].Rows[i]["industryid"];
                                    objLIBtblmstBenchmarkListing[i].bm1_1      = (decimal)ds.Tables[0].Rows[i]["bm1_1"];
                                    objLIBtblmstBenchmarkListing[i].bm1_2      = (decimal)ds.Tables[0].Rows[i]["bm1_2"];
                                    objLIBtblmstBenchmarkListing[i].bm2_1      = (decimal)ds.Tables[0].Rows[i]["bm2_1"];
                                    objLIBtblmstBenchmarkListing[i].bm2_2      = (decimal)ds.Tables[0].Rows[i]["bm2_2"];
                                    objLIBtblmstBenchmarkListing[i].bm3_1      = (decimal)ds.Tables[0].Rows[i]["bm3_1"];
                                    objLIBtblmstBenchmarkListing[i].bm3_2      = (decimal)ds.Tables[0].Rows[i]["bm3_2"];
                                    objLIBtblmstBenchmarkListing[i].currency   = ds.Tables[0].Rows[i]["currency"].ToString();
                                }
                                Packet.MessageId = 1;
                            }
                            else
                            {
                                Packet.MessageId = -1;
                            }
                        }
                    }
                }

                Packet.MessageResultsetDS = ds;
                Packet.MessageResultset   = objLIBtblmstBenchmarkListing;
            }
            catch (Exception ex)
            {
                Packet.MessageId = -1;
                Packet.ex        = ex;
                MyCLS.clsHandleException.HandleEx(ex, System.Reflection.MethodBase.GetCurrentMethod().ToString(), true);
            }
            return(Packet);
        }
コード例 #9
0
//*******COPY IT TO USE BELOW FUNCTION - SELECT BY ID************
//try
//{
//    LIBtblOrgNatureofBussinessListing objLIBtblOrgNatureofBussinessListing = new LIBtblOrgNatureofBussinessListing();
//    DALtblOrgNatureofBussiness objDALtblOrgNatureofBussiness = new DALtblOrgNatureofBussiness();
//    MyCLS.TransportationPacket tp = new MyCLS.TransportationPacket();
//    DataSet ds = new DataSet();

////  txt.Text = objLIBtblOrgNatureofBussinessListing[0].id = "";
////  txt.Text = objLIBtblOrgNatureofBussinessListing[0].orgid = "";
////  txt.Text = objLIBtblOrgNatureofBussinessListing[0].natureid = "";
////  txt.Text = objLIBtblOrgNatureofBussinessListing[0].createdBy = "";
////  txt.Text = objLIBtblOrgNatureofBussinessListing[0].dt = "";
//    tp.MessagePacket = 1;    //ID to be Passed

//    tp = objDALtblOrgNatureofBussiness.GettblOrgNatureofBussinessDetails(tp);
//    if(tp.MessageId == 1)
//{
//        objLIBtblOrgNatureofBussinessListing = (LIBtblOrgNatureofBussinessListing)tp.MessageResultset;
//        ds = (DataSet)tp.MessageResultsetDS;
//        MessageBox.Show(objLIBtblOrgNatureofBussinessListing[0].ToString());
//    }
//    }
//catch(Exception ex)
//    {
//    MyCLS.clsHandleException.HandleEx(ex, System.Reflection.MethodBase.GetCurrentMethod().ToString(), true);
//    }

/// <summary>
/// Accepts=TransportationPacket, Return=Packet, Result=Packet.MessageId, Return Values=Packet.MessageResultset
/// </summary>
/// <returns></returns>
/// <remarks></remarks>
        public MyCLS.TransportationPacket GettblOrgNatureofBussinessDetails(MyCLS.TransportationPacket Packet)
        {
            DataSet             ds           = new DataSet();
            List <SqlParameter> objParamList = new List <SqlParameter>();
            LIBtblOrgNatureofBussinessListing objLIBtblOrgNatureofBussinessListing = new LIBtblOrgNatureofBussinessListing();

            MyCLS.clsExecuteStoredProcSql clsESPSql = new MyCLS.clsExecuteStoredProcSql();

            try
            {
                objParamList.Add(new SqlParameter("@Id", Packet.MessagePacket));
                ds = clsESPSql.ExecuteSPDataSet("SP_GetDetailsFromtblOrgNatureofBussinessById", objParamList);
                if (ds != null)
                {
                    if (ds.Tables != null)
                    {
                        if (ds.Tables[0].Rows != null)
                        {
                            if (ds.Tables[0].Rows.Count > 0)
                            {
                                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                                {
                                    LIBtblOrgNatureofBussiness oLIBtblOrgNatureofBussiness = new LIBtblOrgNatureofBussiness();

                                    objLIBtblOrgNatureofBussinessListing.Add(oLIBtblOrgNatureofBussiness);
                                    objLIBtblOrgNatureofBussinessListing[i].id        = (int)ds.Tables[0].Rows[i]["id"];
                                    objLIBtblOrgNatureofBussinessListing[i].orgid     = (int)ds.Tables[0].Rows[i]["orgid"];
                                    objLIBtblOrgNatureofBussinessListing[i].natureid  = (int)ds.Tables[0].Rows[i]["natureid"];
                                    objLIBtblOrgNatureofBussinessListing[i].createdBy = ds.Tables[0].Rows[i]["createdBy"].ToString();
                                    objLIBtblOrgNatureofBussinessListing[i].dt        = ds.Tables[0].Rows[i]["dt"].ToString();
                                }
                                Packet.MessageId = 1;
                            }
                            else
                            {
                                Packet.MessageId = -1;
                            }
                        }
                    }
                }

                Packet.MessageResultsetDS = ds;
                Packet.MessageResultset   = objLIBtblOrgNatureofBussinessListing;
            }
            catch (Exception ex)
            {
                Packet.MessageId = -1;
                Packet.ex        = ex;
                MyCLS.clsHandleException.HandleEx(ex, System.Reflection.MethodBase.GetCurrentMethod().ToString(), true);
            }
            return(Packet);
        }
コード例 #10
0
//PUT IT IN LOAD EVENTS

//MyCLS.strConnStringOLEDB = "Initial Catalog=AB;Data Source=127.0.0.1;UID=sa;PWD=sa123;Provider=SQLOLEDB.1";
//MyCLS.strConnStringSQLCLIENT = "Initial Catalog=AB;Data Source=127.0.0.1;UID=sa;PWD=sa123;";

//*******COPY IT TO USE BELOW FUNCTION - SELECT ALL************
//try
//{
//    LIBtblmstContactListing objLIBtblmstContactListing = new LIBtblmstContactListing();
//    DALtblmstContact objDALtblmstContact = new DALtblmstContact();
//    MyCLS.TransportationPacket tp = new MyCLS.TransportationPacket();
//    DataSet ds = new DataSet();

////  txt.Text = objLIBtblmstContactListing[0].id;
////  txt.Text = objLIBtblmstContactListing[0].Name;
////  txt.Text = objLIBtblmstContactListing[0].Email;
////  txt.Text = objLIBtblmstContactListing[0].phone;
////  txt.Text = objLIBtblmstContactListing[0].designation;
////  txt.Text = objLIBtblmstContactListing[0].OrgName;
////  txt.Text = objLIBtblmstContactListing[0].dt;
//    tp = objDALtblmstContact.GettblmstContactDetails();
//    if(tp.MessageId == 1)
//{
//        objLIBtblmstContactListing = (LIBtblmstContactListing)tp.MessageResultset;
//        ds = (DataSet)tp.MessageResultsetDS;
//        MessageBox.Show(objLIBtblmstContactListing[0].ToString());
//    }
//}
//catch(Exception ex)
//{
//    MyCLS.clsHandleException.HandleEx(ex, System.Reflection.MethodBase.GetCurrentMethod().ToString(), true);
//}

/// <summary>
/// Accepts=Nothing, Return=Packet, Result=Packet.MessageId, Return Values=Packet.MessageResultset
/// </summary>
/// <returns></returns>
/// <remarks></remarks>
        public MyCLS.TransportationPacket GettblmstContactDetails()
        {
            DataSet ds = new DataSet();
            LIBtblmstContactListing objLIBtblmstContactListing = new LIBtblmstContactListing();

            MyCLS.TransportationPacket    Packet    = new MyCLS.TransportationPacket();
            MyCLS.clsExecuteStoredProcSql clsESPSql = new MyCLS.clsExecuteStoredProcSql();

            try
            {
                ds = clsESPSql.ExecuteSPDataSet("SP_GetDetailsFromtblmstContact");
                if (ds != null)
                {
                    if (ds.Tables != null)
                    {
                        if (ds.Tables[0].Rows != null)
                        {
                            if (ds.Tables[0].Rows.Count > 0)
                            {
                                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                                {
                                    LIBtblmstContact oLIBtblmstContact = new LIBtblmstContact();
                                    objLIBtblmstContactListing.Add(oLIBtblmstContact);
                                    objLIBtblmstContactListing[i].id          = (int)ds.Tables[0].Rows[i]["id"];
                                    objLIBtblmstContactListing[i].Name        = ds.Tables[0].Rows[i]["Name"].ToString();
                                    objLIBtblmstContactListing[i].Email       = ds.Tables[0].Rows[i]["Email"].ToString();
                                    objLIBtblmstContactListing[i].phone       = ds.Tables[0].Rows[i]["phone"].ToString();
                                    objLIBtblmstContactListing[i].designation = ds.Tables[0].Rows[i]["designation"].ToString();
                                    objLIBtblmstContactListing[i].OrgName     = ds.Tables[0].Rows[i]["OrgName"].ToString();
                                    objLIBtblmstContactListing[i].dt          = ds.Tables[0].Rows[i]["dt"].ToString();
                                }
                                Packet.MessageId = 1;
                            }
                            else
                            {
                                Packet.MessageId = -1;
                            }
                        }
                    }
                }

                Packet.MessageResultsetDS = ds;
                Packet.MessageResultset   = objLIBtblmstContactListing;
            }
            catch (Exception ex)
            {
                Packet.MessageId = -1;
                Packet.ex        = ex;
                MyCLS.clsHandleException.HandleEx(ex, System.Reflection.MethodBase.GetCurrentMethod().ToString(), true);
            }
            return(Packet);
        }
コード例 #11
0
//PUT IT IN LOAD EVENTS

//MyCLS.strConnStringOLEDB = "Initial Catalog=AB;Data Source=127.0.0.1;UID=sa;PWD=sa123;Provider=SQLOLEDB.1";
//MyCLS.strConnStringSQLCLIENT = "Initial Catalog=AB;Data Source=127.0.0.1;UID=sa;PWD=sa123;";

//*******COPY IT TO USE BELOW FUNCTION - SELECT ALL************
//try
//{
//    LIBtblmstPerformanceListing objLIBtblmstPerformanceListing = new LIBtblmstPerformanceListing();
//    DALtblmstPerformance objDALtblmstPerformance = new DALtblmstPerformance();
//    MyCLS.TransportationPacket tp = new MyCLS.TransportationPacket();
//    DataSet ds = new DataSet();

////  txt.Text = objLIBtblmstPerformanceListing[0].id;
////  txt.Text = objLIBtblmstPerformanceListing[0].orgid;
////  txt.Text = objLIBtblmstPerformanceListing[0].LatestPerformance;
////  txt.Text = objLIBtblmstPerformanceListing[0].PerLevel;
//    tp = objDALtblmstPerformance.GettblmstPerformanceDetails();
//    if(tp.MessageId == 1)
//{
//        objLIBtblmstPerformanceListing = (LIBtblmstPerformanceListing)tp.MessageResultset;
//        ds = (DataSet)tp.MessageResultsetDS;
//        MessageBox.Show(objLIBtblmstPerformanceListing[0].ToString());
//    }
//}
//catch(Exception ex)
//{
//    MyCLS.clsHandleException.HandleEx(ex, System.Reflection.MethodBase.GetCurrentMethod().ToString(), true);
//}

/// <summary>
/// Accepts=Nothing, Return=Packet, Result=Packet.MessageId, Return Values=Packet.MessageResultset
/// </summary>
/// <returns></returns>
/// <remarks></remarks>
        public MyCLS.TransportationPacket GettblmstPerformanceDetails()
        {
            DataSet ds = new DataSet();
            LIBtblmstPerformanceListing objLIBtblmstPerformanceListing = new LIBtblmstPerformanceListing();

            MyCLS.TransportationPacket    Packet    = new MyCLS.TransportationPacket();
            MyCLS.clsExecuteStoredProcSql clsESPSql = new MyCLS.clsExecuteStoredProcSql();

            try
            {
                ds = clsESPSql.ExecuteSPDataSet("SP_GetDetailsFromtblmstPerformance");
                if (ds != null)
                {
                    if (ds.Tables != null)
                    {
                        if (ds.Tables[0].Rows != null)
                        {
                            if (ds.Tables[0].Rows.Count > 0)
                            {
                                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                                {
                                    LIBtblmstPerformance oLIBtblmstPerformance = new LIBtblmstPerformance();
                                    objLIBtblmstPerformanceListing.Add(oLIBtblmstPerformance);
                                    objLIBtblmstPerformanceListing[i].id                = (int)ds.Tables[0].Rows[i]["id"];
                                    objLIBtblmstPerformanceListing[i].orgid             = (int)ds.Tables[0].Rows[i]["orgid"];
                                    objLIBtblmstPerformanceListing[i].LatestPerformance = ds.Tables[0].Rows[i]["LatestPerformance"].ToString();
                                    objLIBtblmstPerformanceListing[i].PerLevel          = (int)ds.Tables[0].Rows[i]["PerLevel"];
                                }
                                Packet.MessageId = 1;
                            }
                            else
                            {
                                Packet.MessageId = -1;
                            }
                        }
                    }
                }

                Packet.MessageResultsetDS = ds;
                Packet.MessageResultset   = objLIBtblmstPerformanceListing;
            }
            catch (Exception ex)
            {
                Packet.MessageId = -1;
                Packet.ex        = ex;
                MyCLS.clsHandleException.HandleEx(ex, System.Reflection.MethodBase.GetCurrentMethod().ToString(), true);
            }
            return(Packet);
        }
コード例 #12
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);
        }
コード例 #13
0
        public DataSet FillData(string whrCon, string procedureName)
        {
            DataSet             ds           = new DataSet();
            List <SqlParameter> objParamList = new List <SqlParameter>();

            MyCLS.clsExecuteStoredProcSql clsESPSql = new MyCLS.clsExecuteStoredProcSql();

            try
            {
                objParamList.Add(new SqlParameter("@whrCon", whrCon));

                ds = clsESPSql.ExecuteSPDataSet(procedureName, objParamList);
                return(ds);
            }
            catch (Exception ex)
            {
                return(null);
            }
        }
コード例 #14
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);
        }
コード例 #15
0
        public DataSet ExQuery(string Query)
        {
            DataSet ds     = new DataSet();
            int     rCount = 0;

            List <SqlParameter> objParamList = new List <SqlParameter>();

            MyCLS.clsExecuteStoredProcSql clsESPSql = new MyCLS.clsExecuteStoredProcSql();

            try
            {
                objParamList.Add(new SqlParameter("@Query", Query));

                ds = clsESPSql.ExecuteSPDataSet("SP_QueryExec", objParamList);
            }
            catch (Exception ex)
            {
            }


            return(ds);
        }
コード例 #16
0
        public int DeleteSYData(string AppId, string tableNm)
        {
            DataSet             ds           = new DataSet();
            int                 rCount       = 0;
            List <SqlParameter> objParamList = new List <SqlParameter>();

            MyCLS.clsExecuteStoredProcSql clsESPSql = new MyCLS.clsExecuteStoredProcSql();

            try
            {
                objParamList.Add(new SqlParameter("@whrCon", AppId));
                objParamList.Add(new SqlParameter("@tableName", tableNm));

                rCount = clsESPSql.ExecuteSPNonQuery("Sp_DeleteTableData", objParamList);
            }
            catch (Exception ex)
            {
            }


            return(rCount);
        }
コード例 #17
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);
        }
コード例 #18
0
        public DataSet importComboDataFill(string _IdField, string _Desc, string _tableNm, string _whrCon)
        {
            DataSet             ds           = new DataSet();
            List <SqlParameter> objParamList = new List <SqlParameter>();

            MyCLS.clsExecuteStoredProcSql clsESPSql = new MyCLS.clsExecuteStoredProcSql();

            try
            {
                objParamList.Add(new SqlParameter("@IdField", _IdField));
                objParamList.Add(new SqlParameter("@FieldDESC", _Desc));
                objParamList.Add(new SqlParameter("@tableName", _tableNm));
                objParamList.Add(new SqlParameter("@whrCon", _whrCon));
                ds = clsESPSql.ExecuteSPDataSet("importComboData", objParamList);
            }
            catch (Exception ex)
            {
                return(null);
            }


            return(ds);
        }
コード例 #19
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);
        }
コード例 #20
0
//PUT IT IN LOAD EVENTS

//MyCLS.strConnStringOLEDB = "Initial Catalog=AB;Data Source=127.0.0.1;UID=sa;PWD=sa123;Provider=SQLOLEDB.1";
//MyCLS.strConnStringSQLCLIENT = "Initial Catalog=AB;Data Source=127.0.0.1;UID=sa;PWD=sa123;";

//*******COPY IT TO USE BELOW FUNCTION - SELECT ALL************
//try
//{
//    LIBtblmstEmployeeListing objLIBtblmstEmployeeListing = new LIBtblmstEmployeeListing();
//    DALtblmstEmployee objDALtblmstEmployee = new DALtblmstEmployee();
//    MyCLS.TransportationPacket tp = new MyCLS.TransportationPacket();
//    DataSet ds = new DataSet();

////  txt.Text = objLIBtblmstEmployeeListing[0].ID;
////  txt.Text = objLIBtblmstEmployeeListing[0].EmpID;
////  txt.Text = objLIBtblmstEmployeeListing[0].DOb;
////  txt.Text = objLIBtblmstEmployeeListing[0].Age;
////  txt.Text = objLIBtblmstEmployeeListing[0].DOJ;
////  txt.Text = objLIBtblmstEmployeeListing[0].Gender;
////  txt.Text = objLIBtblmstEmployeeListing[0].Dept;
////  txt.Text = objLIBtblmstEmployeeListing[0].Desig;
////  txt.Text = objLIBtblmstEmployeeListing[0].Grade;
////  txt.Text = objLIBtblmstEmployeeListing[0].Managerid;
////  txt.Text = objLIBtblmstEmployeeListing[0].LatestPerformance;
////  txt.Text = objLIBtblmstEmployeeListing[0].LastPromotion;
////  txt.Text = objLIBtblmstEmployeeListing[0].Grosspay;
////  txt.Text = objLIBtblmstEmployeeListing[0].currency;
////  txt.Text = objLIBtblmstEmployeeListing[0].createdBy;
////  txt.Text = objLIBtblmstEmployeeListing[0].dt;
////  txt.Text = objLIBtblmstEmployeeListing[0].fYear;
//    tp = objDALtblmstEmployee.GettblmstEmployeeDetails();
//    if(tp.MessageId == 1)
//{
//        objLIBtblmstEmployeeListing = (LIBtblmstEmployeeListing)tp.MessageResultset;
//        ds = (DataSet)tp.MessageResultsetDS;
//        MessageBox.Show(objLIBtblmstEmployeeListing[0].ToString());
//    }
//}
//catch(Exception ex)
//{
//    MyCLS.clsHandleException.HandleEx(ex, System.Reflection.MethodBase.GetCurrentMethod().ToString(), true);
//}

/// <summary>
/// Accepts=Nothing, Return=Packet, Result=Packet.MessageId, Return Values=Packet.MessageResultset
/// </summary>
/// <returns></returns>
/// <remarks></remarks>
        public MyCLS.TransportationPacket GettblmstEmployeeDetails()
        {
            DataSet ds = new DataSet();
            LIBtblmstEmployeeListing objLIBtblmstEmployeeListing = new LIBtblmstEmployeeListing();

            MyCLS.TransportationPacket    Packet    = new MyCLS.TransportationPacket();
            MyCLS.clsExecuteStoredProcSql clsESPSql = new MyCLS.clsExecuteStoredProcSql();

            try
            {
                ds = clsESPSql.ExecuteSPDataSet("SP_GetDetailsFromtblmstEmployee");
                if (ds != null)
                {
                    if (ds.Tables != null)
                    {
                        if (ds.Tables[0].Rows != null)
                        {
                            if (ds.Tables[0].Rows.Count > 0)
                            {
                                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                                {
                                    LIBtblmstEmployee oLIBtblmstEmployee = new LIBtblmstEmployee();
                                    objLIBtblmstEmployeeListing.Add(oLIBtblmstEmployee);
                                    objLIBtblmstEmployeeListing[i].ID                = (int)ds.Tables[0].Rows[i]["ID"];
                                    objLIBtblmstEmployeeListing[i].EmpID             = ds.Tables[0].Rows[i]["EmpID"].ToString();
                                    objLIBtblmstEmployeeListing[i].DOb               = ds.Tables[0].Rows[i]["DOb"].ToString();
                                    objLIBtblmstEmployeeListing[i].Age               = (int)ds.Tables[0].Rows[i]["Age"];
                                    objLIBtblmstEmployeeListing[i].DOJ               = ds.Tables[0].Rows[i]["DOJ"].ToString();
                                    objLIBtblmstEmployeeListing[i].Gender            = ds.Tables[0].Rows[i]["Gender"].ToString();
                                    objLIBtblmstEmployeeListing[i].Dept              = ds.Tables[0].Rows[i]["Dept"].ToString();
                                    objLIBtblmstEmployeeListing[i].Desig             = ds.Tables[0].Rows[i]["Desig"].ToString();
                                    objLIBtblmstEmployeeListing[i].Grade             = ds.Tables[0].Rows[i]["Grade"].ToString();
                                    objLIBtblmstEmployeeListing[i].Managerid         = ds.Tables[0].Rows[i]["Managerid"].ToString();
                                    objLIBtblmstEmployeeListing[i].LatestPerformance = ds.Tables[0].Rows[i]["LatestPerformance"].ToString();
                                    objLIBtblmstEmployeeListing[i].LastPromotion     = ds.Tables[0].Rows[i]["LastPromotion"].ToString();
                                    objLIBtblmstEmployeeListing[i].Grosspay          = (decimal)ds.Tables[0].Rows[i]["Grosspay"];
                                    objLIBtblmstEmployeeListing[i].currency          = ds.Tables[0].Rows[i]["currency"].ToString();
                                    objLIBtblmstEmployeeListing[i].createdBy         = ds.Tables[0].Rows[i]["createdBy"].ToString();
                                    objLIBtblmstEmployeeListing[i].dt                = ds.Tables[0].Rows[i]["dt"].ToString();
                                    objLIBtblmstEmployeeListing[i].fYear             = ds.Tables[0].Rows[i]["fYear"].ToString();
                                }
                                Packet.MessageId = 1;
                            }
                            else
                            {
                                Packet.MessageId = -1;
                            }
                        }
                    }
                }

                Packet.MessageResultsetDS = ds;
                Packet.MessageResultset   = objLIBtblmstEmployeeListing;
            }
            catch (Exception ex)
            {
                Packet.MessageId = -1;
                Packet.ex        = ex;
                MyCLS.clsHandleException.HandleEx(ex, System.Reflection.MethodBase.GetCurrentMethod().ToString(), true);
            }
            return(Packet);
        }