コード例 #1
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);
        }
コード例 #2
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
//{
//    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 = objDALtblmstBenchmark.GettblmstBenchmarkDetails();
//    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=Nothing, Return=Packet, Result=Packet.MessageId, Return Values=Packet.MessageResultset
/// </summary>
/// <returns></returns>
/// <remarks></remarks>
        public MyCLS.TransportationPacket GettblmstBenchmarkDetails()
        {
            DataSet ds = new DataSet();
            LIBtblmstBenchmarkListing objLIBtblmstBenchmarkListing = new LIBtblmstBenchmarkListing();

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

            try
            {
                ds = clsESPSql.ExecuteSPDataSet("SP_GetDetailsFromtblmstBenchmark");
                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
//{
//    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.MessagePacket = 1;    //ID to be Passed

//    tp = objDALtblmstContact.GettblmstContactDetails(tp);
//    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=TransportationPacket, Return=Packet, Result=Packet.MessageId, Return Values=Packet.MessageResultset
/// </summary>
/// <returns></returns>
/// <remarks></remarks>
        public MyCLS.TransportationPacket GettblmstContactDetails(MyCLS.TransportationPacket Packet)
        {
            DataSet                 ds           = new DataSet();
            List <SqlParameter>     objParamList = new List <SqlParameter>();
            LIBtblmstContactListing objLIBtblmstContactListing = new LIBtblmstContactListing();

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

            try
            {
                objParamList.Add(new SqlParameter("@Id", Packet.MessagePacket));
                ds = clsESPSql.ExecuteSPDataSet("SP_GetDetailsFromtblmstContactById", 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++)
                                {
                                    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);
        }
コード例 #4
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
//{
//    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 = objDALtblOrgBasicInfo.GettblOrgBasicInfoDetails();
//    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=Nothing, Return=Packet, Result=Packet.MessageId, Return Values=Packet.MessageResultset
/// </summary>
/// <returns></returns>
/// <remarks></remarks>
        public MyCLS.TransportationPacket GettblOrgBasicInfoDetails()
        {
            DataSet ds = new DataSet();
            LIBtblOrgBasicInfoListing objLIBtblOrgBasicInfoListing = new LIBtblOrgBasicInfoListing();

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

            try
            {
                ds = clsESPSql.ExecuteSPDataSet("SP_GetDetailsFromtblOrgBasicInfo");
                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);
        }
コード例 #6
0
        public static void HandleEx2DB(Exception ex, string MethodName, string fullMSG, String IP = "")
        {
            try
            {
                LIBErLog             objLIBErLog = new LIBErLog();
                DALErLog             objDALErLog = new DALErLog();
                TransportationPacket tp          = new TransportationPacket();

                objLIBErLog.Id = -1;
                //objLIBErLog.Dt = txt.Text;
                objLIBErLog.StackTrace = ex.StackTrace == null ? "NULL" : ex.StackTrace.ToString();
                objLIBErLog.MethodName = MethodName;
                objLIBErLog.Username   = strLogin;
                objLIBErLog.Msg        = ex.Message == null ? "NULL" : ex.Message.ToString();
                objLIBErLog.Source     = ex.Source == null ? "NULL" : ex.Source.ToString();
                objLIBErLog.TargetSite = ex.TargetSite == null ? "NULL" : ex.TargetSite.ToString();

                if (IP == "")       //***CAPTURE IP IF SENT WHILE FUNCTION CALLED***
                {
                    objLIBErLog.Data = ex.Data == null ? "NULL" : ex.Data.ToString();
                }
                else
                {
                    objLIBErLog.Data = IP;
                }

                if (ex.InnerException != null)
                {
                    objLIBErLog.InnerEx = ex.InnerException.ToString();
                }
                else
                {
                    objLIBErLog.InnerEx = "NULL";
                }

                objLIBErLog.FullMsg = fullMSG;
                //objLIBErLog.FullMsg = fullMsg(ex, MethodName, strLogin);      //fullMsg Method not in USE

                tp.MessagePacket = objLIBErLog;
                tp = objDALErLog.InsertErLog(tp);

                if (tp.MessageId > -1)
                {
                    string[] strOutParamValues = (string[])tp.MessageResultset;
                }
            }
            catch (Exception ex1)
            {
                //???
            }
        }
コード例 #7
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
//{
//    LIBtblmstInstructionListing objLIBtblmstInstructionListing = new LIBtblmstInstructionListing();
//    DALtblmstInstruction objDALtblmstInstruction = new DALtblmstInstruction();
//    MyCLS.TransportationPacket tp = new MyCLS.TransportationPacket();
//    DataSet ds = new DataSet();

////  txt.Text = objLIBtblmstInstructionListing[0].ID;
////  txt.Text = objLIBtblmstInstructionListing[0].DOb/Age;
////  txt.Text = objLIBtblmstInstructionListing[0].currency;
//    tp = objDALtblmstInstruction.GettblmstInstructionDetails();
//    if(tp.MessageId == 1)
//{
//        objLIBtblmstInstructionListing = (LIBtblmstInstructionListing)tp.MessageResultset;
//        ds = (DataSet)tp.MessageResultsetDS;
//        MessageBox.Show(objLIBtblmstInstructionListing[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>


//*******COPY IT TO USE BELOW FUNCTION - SELECT BY ID************
//try
//{
//    LIBtblmstInstructionListing objLIBtblmstInstructionListing = new LIBtblmstInstructionListing();
//    DALtblmstInstruction objDALtblmstInstruction = new DALtblmstInstruction();
//    MyCLS.TransportationPacket tp = new MyCLS.TransportationPacket();
//    DataSet ds = new DataSet();

////  txt.Text = objLIBtblmstInstructionListing[0].ID = "";
////  txt.Text = objLIBtblmstInstructionListing[0].DOb/Age = "";
////  txt.Text = objLIBtblmstInstructionListing[0].currency = "";
//    tp.MessagePacket = 1;    //ID to be Passed

//    tp = objDALtblmstInstruction.GettblmstInstructionDetails(tp);
//    if(tp.MessageId == 1)
//{
//        objLIBtblmstInstructionListing = (LIBtblmstInstructionListing)tp.MessageResultset;
//        ds = (DataSet)tp.MessageResultsetDS;
//        MessageBox.Show(objLIBtblmstInstructionListing[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 GettblmstInstructionDetails(MyCLS.TransportationPacket Packet)
        {
            DataSet                     ds           = new DataSet();
            List <SqlParameter>         objParamList = new List <SqlParameter>();
            LIBtblmstInstructionListing objLIBtblmstInstructionListing = new LIBtblmstInstructionListing();

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

            try
            {
                objParamList.Add(new SqlParameter("@Id", Packet.MessagePacket));
                ds = clsESPSql.ExecuteSPDataSet("SP_GetDetailsFromtblmstInstructionById", 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++)
                                {
                                    LIBtblmstInstruction oLIBtblmstInstruction = new LIBtblmstInstruction();

                                    objLIBtblmstInstructionListing.Add(oLIBtblmstInstruction);
                                    objLIBtblmstInstructionListing[i].ID       = (int)ds.Tables[0].Rows[i]["ID"];
                                    objLIBtblmstInstructionListing[i].DOb_Age  = ds.Tables[0].Rows[i]["DOb_Age"].ToString();
                                    objLIBtblmstInstructionListing[i].currency = ds.Tables[0].Rows[i]["currency"].ToString();
                                }
                                Packet.MessageId = 1;
                            }
                            else
                            {
                                Packet.MessageId = -1;
                            }
                        }
                    }
                }

                Packet.MessageResultsetDS = ds;
                Packet.MessageResultset   = objLIBtblmstInstructionListing;
            }
            catch (Exception ex)
            {
                Packet.MessageId = -1;
                Packet.ex        = ex;
                MyCLS.clsHandleException.HandleEx(ex, System.Reflection.MethodBase.GetCurrentMethod().ToString(), true);
            }
            return(Packet);
        }
コード例 #8
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);
        }
コード例 #9
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);
        }
コード例 #10
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);
        }
コード例 #11
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);
        }
コード例 #12
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);
        }
コード例 #13
0
//*******COPY IT TO USE BELOW FUNCTION - INSERT************
//try
//{
//    LIBtblOrgBasicInfo objLIBtblOrgBasicInfo = new LIBtblOrgBasicInfo();
//    DALtblOrgBasicInfo objDALtblOrgBasicInfo = new DALtblOrgBasicInfo();
//    MyCLS.TransportationPacket tp = new MyCLS.TransportationPacket();

//    objLIBtblOrgBasicInfo.id = txt.Text;
//    objLIBtblOrgBasicInfo.username = txt.Text;
//    objLIBtblOrgBasicInfo.Name = txt.Text;
//    objLIBtblOrgBasicInfo.Email = txt.Text;
//    objLIBtblOrgBasicInfo.phone = txt.Text;
//    objLIBtblOrgBasicInfo.designation = txt.Text;
//    objLIBtblOrgBasicInfo.OrgName = txt.Text;
//    objLIBtblOrgBasicInfo.industry = txt.Text;
//    objLIBtblOrgBasicInfo.dt = txt.Text;
//    tp.MessagePacket = objLIBtblOrgBasicInfo;
//    tp = objDALtblOrgBasicInfo.InserttblOrgBasicInfo(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 InserttblOrgBasicInfo(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
            {
                LIBtblOrgBasicInfo objLIBtblOrgBasicInfo = new LIBtblOrgBasicInfo();
                objLIBtblOrgBasicInfo = (LIBtblOrgBasicInfo)Packet.MessagePacket;

                objParamList.Add(new SqlParameter("@id", objLIBtblOrgBasicInfo.id));
                objParamList.Add(new SqlParameter("@username", objLIBtblOrgBasicInfo.username));
                objParamList.Add(new SqlParameter("@Name", objLIBtblOrgBasicInfo.Name));
                objParamList.Add(new SqlParameter("@Email", objLIBtblOrgBasicInfo.Email));
                objParamList.Add(new SqlParameter("@phone", objLIBtblOrgBasicInfo.phone));
                objParamList.Add(new SqlParameter("@designation", objLIBtblOrgBasicInfo.designation));
                objParamList.Add(new SqlParameter("@OrgName", objLIBtblOrgBasicInfo.OrgName));
                objParamList.Add(new SqlParameter("@industry", objLIBtblOrgBasicInfo.industry));
                objParamList.Add(new SqlParameter("@Orglevel", objLIBtblOrgBasicInfo.Orglevel));
                objParamList.Add(new SqlParameter("@dt", objLIBtblOrgBasicInfo.dt));
                objParamListOut.Add(new SqlParameter("@@id", SqlDbType.Int));
                strOutParamValues       = clsESPSql.ExecuteSPNonQueryOutPut("SP_InserttblOrgBasicInfo", 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);
        }
コード例 #14
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);
        }