Пример #1
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);
        }
Пример #2
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);
        }
Пример #3
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);
        }
Пример #4
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);
        }
Пример #5
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);
        }
//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);
        }
//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);
        }
Пример #8
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);
            }
        }
Пример #9
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);
        }
Пример #10
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);
        }
Пример #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
//{
//    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);
        }