コード例 #1
0
        private void CreateDataTable()
        {
            try
            {
                dt = new DataTable();
                dt.Columns.Add("ProductID", typeof(Int32));
                dt.Columns.Add("ProductName", typeof(String));
                dt.Columns.Add("ProductCode", typeof(String));
                dt.Columns.Add("CategoryID", typeof(Int32));
                dt.Columns.Add("CategoryName", typeof(String));
                dt.Columns.Add("Spec", typeof(String));
                dt.Columns.Add("Total_Qty", typeof(Double));
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    dt.Columns.Add("Act_Qty_" + ds.Tables[0].Rows[i]["id"].ToString(), typeof(Double));
                    dt.Columns.Add("Blck_Qty_" + ds.Tables[0].Rows[i]["id"].ToString(), typeof(Double));

                    dt.Columns.Add("Total_Qty_" + ds.Tables[0].Rows[i]["id"].ToString(), typeof(Double));

                    dt.Columns.Add("Blck_Qty_Exp_" + ds.Tables[0].Rows[i]["id"].ToString(), typeof(Int32));
                    dt.Columns.Add("ReOrd_Qty_" + ds.Tables[0].Rows[i]["id"].ToString(), typeof(Double));
                    dt.Columns.Add("ReOrd_ExpDt_" + ds.Tables[0].Rows[i]["id"].ToString(), typeof(String));
                }
            }
            catch (Exception ex)
            {
                PLog.Error("Error::Class > StockReport, Method >CreateDataTable()", ex);
            }
        }
コード例 #2
0
ファイル: General.cs プロジェクト: pasha494/MAPInventory
        public string HealthCheckConnection()
        {
            string        flag       = "";
            SqlConnection connection = null;

            try
            {
                connection = new SqlConnection(SQLAdapter.GetConnection());
                connection.Open();
                flag = "Success";
            }
            catch (Exception ex)
            {
                flag = "Error:" + ex.ToString();
                PLog.Error("HealthCheck", ex, 0, "");
            }
            finally
            {
                if (connection != null && connection.State == ConnectionState.Open)
                {
                    connection.Close();
                }
            }
            return(flag);
        }
コード例 #3
0
        public string SaveDocumentOUT(string Data)
        {
            PLog.Info("BEGIN::Controller > GridStock, Method > SaveDocumentOUT(string Data):::" + Data);
            string DocName = "";

            try
            {
                OutwardDocumentImple objModel = JsonConvert.DeserializeObject <OutwardDocumentImple>(Data);
                long     Flg = 0;
                string[] sD  = objModel.DocDate.Split('-');
                objModel.DocDate = new DateTime(Convert.ToInt32(sD[2]), Convert.ToInt32(sD[1]), Convert.ToInt32(sD[0])).ToString();

                if (!string.IsNullOrEmpty(objModel.EffectiveDate))
                {
                    string[] sD1 = objModel.EffectiveDate.Split('-');
                    objModel.EffectiveDate = new DateTime(Convert.ToInt32(sD1[2]), Convert.ToInt32(sD1[1]), Convert.ToInt32(sD1[0])).ToString();
                }
                DocName = objModel.SaveDocument(out Flg);
                if (Flg == -494)
                {
                    DocName = "-494";
                }
            }
            catch (Exception ex)
            {
                PLog.Error("Error::Controller >GridStock, Method > SaveDocumentOUT(string Data)", ex);
            }
            PLog.Info("END::Controller > GridStock, Method > SaveDocumentOUT(string Data):::" + Data);
            return(DocName);
        }
コード例 #4
0
        public string WarehouseData()
        {
            PLog.Info("BEGIN::Controller > GridStock, Method > WarehouseData");
            List <Dictionary <string, object> > rows = new List <Dictionary <string, object> >();

            System.Web.Script.Serialization.JavaScriptSerializer serializer = new System.Web.Script.Serialization.JavaScriptSerializer();
            Dictionary <string, object> row;

            try
            {
                IWareHouseImple oWareHouse = new WareHouseImple();
                DataTable       dt         = oWareHouse.GetGridData(0); //0 will gets all the WareHouse data

                foreach (DataRow dr in dt.Rows)
                {
                    row = new Dictionary <string, object>();
                    foreach (DataColumn col in dt.Columns)
                    {
                        row.Add(col.ColumnName, dr[col]);
                    }
                    rows.Add(row);
                }
            }
            catch (Exception ex)
            {
                PLog.Error("Error::Controller >GridStock, Method >WarehouseData", ex);
                throw;
            }
            PLog.Info("END::Controller > GridStock, Method > WarehouseData");
            return(serializer.Serialize(rows));
        }
コード例 #5
0
        public string LoadStockTransferDocuments()
        {
            PLog.Info("BEGIN::Controller > GridStock, Method > LoadStockTransferDocuments()");
            System.Web.Script.Serialization.JavaScriptSerializer serializer = new System.Web.Script.Serialization.JavaScriptSerializer();
            List <Dictionary <string, object> > rows = new List <Dictionary <string, object> >();

            try
            {
                DataSet            ds       = new DataSet();
                StockTransferImple objModel = new StockTransferImple();
                ds = objModel.GetGirdData(0);//0 will get all the active StockTransfer masters data
                DataTable dt = ds.Tables[0];

                Dictionary <string, object> row;
                foreach (DataRow dr in dt.Rows)
                {
                    row = new Dictionary <string, object>();
                    foreach (DataColumn col in dt.Columns)
                    {
                        row.Add(col.ColumnName, dr[col]);
                    }
                    rows.Add(row);
                }
            }
            catch (Exception ex)
            {
                PLog.Error("Error::Controller >GridStock, Method > LoadStockTransferDocuments()", ex);
            }
            PLog.Info("END::Controller > GridStock, Method > LoadStockTransferDocuments()");
            return(serializer.Serialize(rows));
        }
コード例 #6
0
        public ActionResult GetNextPrevDoc(string _Action, int DocType, int DocNo)
        {
            PLog.Info("BEGIN::Controller > GridStock, Method > GetNextPrevDoc");
            CommonImple _CommonImple = new CommonImple();

            if (DocType == 1)//opening stocks
            {
                DataSet ds = _CommonImple.GetNextPrevDocData(DocType);
                int     x  = GetDocNo(ds, DocNo, _Action);
                if (x == 0)
                {
                    return(RedirectToAction("AddOpStock"));
                }
                else
                {
                    return(RedirectToAction("UpDateOpStock", new { DocID = x }));
                }
            }
            else if (DocType == 2)
            {
                DataSet ds = _CommonImple.GetNextPrevDocData(DocType);
                int     x  = GetDocNo(ds, DocNo, _Action);
                if (x == 0)
                {
                    return(RedirectToAction("AddInStock"));
                }
                else
                {
                    return(RedirectToAction("UpDateInStock", new { DocID = x }));
                }
            }
            else if (DocType == 3)
            {
                DataSet ds = _CommonImple.GetNextPrevDocData(DocType);
                int     x  = GetDocNo(ds, DocNo, _Action);
                if (x == 0)
                {
                    return(RedirectToAction("AddOutStock"));
                }
                else
                {
                    return(RedirectToAction("UpdateOutStock", new { DocID = x }));
                }
            }
            else if (DocType == 4)
            {
                DataSet ds = _CommonImple.GetNextPrevDocData(DocType);
                int     x  = GetDocNo(ds, DocNo, _Action);
                if (x == 0)
                {
                    return(RedirectToAction("AddStockTransfer"));
                }
                else
                {
                    return(RedirectToAction("UpDateStockTransfer", new { DocID = x }));
                }
            }

            return(Content(""));
        }
コード例 #7
0
        public ActionResult LoginSubmit(string email, string password, int RememberMe)
        {
            PLog.Info("BEGIN::Controller > Home, Method > LoginSubmit(string email, string password)");
            int Flg = 0;


            try
            {
                // str = Convert.ToInt32(str).ToString();
                if (!string.IsNullOrEmpty(email) && !string.IsNullOrEmpty(password))
                {
                    LoginImple obj = new LoginImple();
                    Flg = obj.CheckLogin(email, password);
                    if (Flg > 0)
                    {
                        CreateLoginCookies(RememberMe, email, password);
                    }
                }
            }
            catch (Exception ex)
            {
                PLog.Error("Error::Controller > Home, Method > LoginSubmit", ex);
            }
            PLog.Info("END::Controller > Home, Method > LoginSubmit");
            return(Content(Flg.ToString()));
        }
コード例 #8
0
        public Task <bool> SendBuffer(byte[] data, int offset, int count)
        {
            PLog.LogTrace($"Sending data to {m_remote}, Data Length = {count}");
            TaskCompletionSource <bool> src = new TaskCompletionSource <bool>();

            if (!m_isConnected)
            {
                PLog.LogWarning("Failed to send. Needs to be connected before calling send");
                src.SetResult(false);
                return(src.Task);
            }

            try
            {
                var args = m_factory.GetEmptyArgs(); // No need to Free these, as using own buffer
                args.UserToken      = src;
                args.RemoteEndPoint = m_remote;
                args.SetBuffer(data, offset, count);
                args.Completed += OnSendBufferCompleted;

                if (!m_socket.SendAsync(args))
                {
                    OnSendBufferCompleted(this, args as SocketAsyncEventArgs);
                }
            }
            catch (Exception ex)
            {
                PLog.LogError(ex, $"Exception while sending data to {m_remote}");
                src.SetException(ex);
            }

            return(src.Task);
        }
コード例 #9
0
ファイル: UsersImple.cs プロジェクト: pasha494/MAPInventory
        public UsersModel EditUser(int ID)
        {
            UsersModel objUsers = new UsersModel();

            try
            {
                DataTable dt = GetGridData(ID);

                if (dt != null && dt.Rows.Count > 0)
                {
                    objUsers.UserID = Convert.ToInt32(dt.Rows[0]["ID"].ToString());
                    objUsers.Name = dt.Rows[0]["username"].ToString();
                    objUsers.Email = dt.Rows[0]["email"].ToString();
                    objUsers.Password = dt.Rows[0]["Password"].ToString();
                    objUsers.IsAdmin = Convert.ToBoolean(dt.Rows[0]["IsAdmin"]);
                    if (dt.Rows[0]["RoleID"] != DBNull.Value)
                        objUsers.RoleID = Convert.ToInt32(dt.Rows[0]["RoleID"].ToString());
                }

            }
            catch (Exception ex)
            {
                PLog.Error("Error::Class > Users, Method > EditUser(int ID)", ex);
            }

            return objUsers;
        }
コード例 #10
0
        public string SaveDocument(out long ret)
        {
            ret = 0; string DocName = "";

            try
            {
                ArrayList al = new ArrayList();
                al.Add(this.DocID);
                al.Add(this.DocName);
                al.Add(Convert.ToDateTime(this.DocDate));
                al.Add(this.WareHouseId);
                al.Add(this.IsExpected);
                al.Add(this.CustomerId);
                al.Add(this.IsExpected ? this.EffectiveDate : null);
                al.Add(this.GridData);
                al.Add(this.Comments);
                al.Add(Convert.ToInt32(_LookUps.GetSessionObject("UserID")));
                DocName = _General.Set(al, "sp_InsertUpdateOutwardDoc", out ret, 0);
            }
            catch (Exception ex)
            {
                PLog.Error("Error::Class > OutwardDocument, Method > SaveDocument(out int ret)", ex);
            }

            return(DocName);
        }
コード例 #11
0
        public long SaveProducts(ProductsModel productsModel)
        {
            long flg = 0;

            try
            {
                var al = new ArrayList
                {
                    productsModel.ProductID,
                    productsModel.Code,
                    productsModel.Name,
                    productsModel.ProductCategory,
                    productsModel.Status,
                    productsModel.efDate,
                    productsModel.Spec,
                    productsModel.Price
                };



                _general.Set(al, "sp_InsertUpdateProducts", out flg);
            }
            catch (Exception ex)
            {
                PLog.Error("Error::Class > OutwardDocument, Method >SaveProducts()", ex);
            }
            return(flg);
        }
コード例 #12
0
        public string LoadUsers()
        {
            PLog.Info("BEGIN::Controller > Home, Method > LoadUsers()");
            List <Dictionary <string, object> > rows = new List <Dictionary <string, object> >();

            System.Web.Script.Serialization.JavaScriptSerializer serializer = new System.Web.Script.Serialization.JavaScriptSerializer();
            try
            {
                UsersImple objUsersImple = new UsersImple();

                DataTable dt = objUsersImple.GetGridData(0); //0 will gets all the users data


                Dictionary <string, object> row;
                foreach (DataRow dr in dt.Rows)
                {
                    row = new Dictionary <string, object>();
                    foreach (DataColumn col in dt.Columns)
                    {
                        row.Add(col.ColumnName, dr[col]);
                    }
                    rows.Add(row);
                }
            }
            catch (Exception ex)
            {
                PLog.Error("Error::Controller > Home, Method > LoadUsers()", ex);
            }
            PLog.Info("END::Controller > Home, Method > LoadUsers()");
            return(serializer.Serialize(rows));
        }
コード例 #13
0
        public string SaveDocument(out long ret)
        {
            ret = 0; string DocName = "";

            try
            {
                ArrayList al = new ArrayList();

                al.Add(this.DocID);
                al.Add(this.DocName);
                al.Add(Convert.ToDateTime(this.DocDate));
                al.Add(this.ToWareHouseId);
                al.Add(this.FromWareHouseId);
                al.Add(this.Comments);
                al.Add(this.GridData);
                al.Add(Convert.ToInt32(_LookUps.GetSessionObject("UserID")));

                DocName = _General.Set(al, "sp_InsertUpdateStockTransfer", out ret, 0);
            }
            catch (Exception ex)
            {
                PLog.Error("Error::Class > StockTransfer, Method >SaveDocument(out int ret)", ex);
            }

            return(DocName);
        }
コード例 #14
0
        static void Main(string[] args)
        {
            // **********************
            // intialise Papillon SDK
            // **********************
            PLog.OpenConsoleLogger();
            PapillonSDK.Initialise();

            // **********************************************************
            // set an image from a pixel buffer (a byte[]) and display it
            //***********************************************************
            int width  = 600;
            int height = 400;
            int depth  = 3;

            var buf = new byte[width * height * depth];

            for (int i = 0; i < buf.Length; i += depth)
            {
                buf[i]     = 127;
                buf[i + 1] = 0;
                buf[i + 2] = 255;
            }

            PImage image = new PImage();

            image.Set(buf, width, height, PImage.EPixelFormat.E_BGR8U);
            image.Display("Pink", 10000);
        }
コード例 #15
0
        public string GetProductCategory()
        {
            PLog.Info("BEGIN::Controller > GridStock, Method > GetProductCategory");
            System.Web.Script.Serialization.JavaScriptSerializer serializer = new System.Web.Script.Serialization.JavaScriptSerializer();
            List <Dictionary <string, object> > rows = new List <Dictionary <string, object> >();

            try
            {
                IProductsCategoryImple oProducts = new ProductsCategoryImple();
                DataTable dt = oProducts.GetGridData(0); //0 will gets all the products data

                Dictionary <string, object> row;
                foreach (DataRow dr in dt.Rows)
                {
                    row = new Dictionary <string, object>();
                    foreach (DataColumn col in dt.Columns)
                    {
                        row.Add(col.ColumnName, dr[col]);
                    }
                    rows.Add(row);
                }
            }
            catch (Exception ex)
            {
                PLog.Error("Error::Controller >GridStock, Method > GetProductCategory", ex);
            }
            PLog.Info("END::Controller > GridStock, Method > GetProductCategory");
            return(serializer.Serialize(rows));
        }
コード例 #16
0
        public void EditDocument(int DocID)
        {
            DataSet ds = GetGirdData(DocID);

            try
            {
                if (ds != null && ds.Tables.Count > 0)
                {
                    if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
                    {
                        this.DocID         = DocID;
                        this.DocName       = ds.Tables[0].Rows[0]["DocName"].ToString();
                        this.DocDate       = ConverDate(Convert.ToDateTime(ds.Tables[0].Rows[0]["DocDate"].ToString()));
                        this.WareHouseId   = ds.Tables[0].Rows[0]["WareHouseId"].ToString();
                        this.WareHouseName = ds.Tables[0].Rows[0]["WareHouseName"].ToString();
                    }

                    if (ds.Tables[1] != null && ds.Tables[1].Rows.Count > 0)
                    {
                        this.GridData = JsonConvert.SerializeObject(ds.Tables[1]);
                    }
                }
                LoadScreenControls();
            }
            catch (Exception ex)
            {
                PLog.Error("Error::Class > OpeningStock, Method > EditDocument(int DocID)", ex);
            }
        }
コード例 #17
0
 public ActionResult Login()
 {
     ViewBag.Message = "This is the Login Page";
     PLog.Info("BEGIN::Controller > Home, Method > Login");
     PLog.Info("END::Controller > Home, Method >Login");
     return(View());
 }
コード例 #18
0
        public long SaveWareHouse(WareHouseModel _WareHouseModel)
        {
            long flg = 0;

            try
            {
                ArrayList al = new ArrayList();


                al.Add(_WareHouseModel.WareHouseID);
                al.Add(_WareHouseModel.Code);
                al.Add(_WareHouseModel.Name);
                al.Add(_WareHouseModel.Status);
                al.Add(_WareHouseModel.efDate);

                _General.Set(al, "sp_InsertUpdateWareHouse", out flg);
                // flg = DAL.ExecuteSP("sp_InsertUpdateWareHouse", Params, al);
            }
            catch (Exception ex)
            {
                PLog.Error("Error::Class > WareHouse, Method >SaveWareHouse()", ex);
            }

            return(flg);
        }
コード例 #19
0
        public WareHouseModel EditWareHouse(int ID)
        {
            WareHouseModel _WareHouseModel = new WareHouseModel();

            try
            {
                DataTable dt = GetGridData(ID);

                if (dt != null && dt.Rows.Count > 0)
                {
                    _WareHouseModel.WareHouseID = Convert.ToInt32(dt.Rows[0]["ID"].ToString());
                    _WareHouseModel.Code        = dt.Rows[0]["Code"].ToString();
                    _WareHouseModel.Name        = dt.Rows[0]["Name"].ToString();
                    _WareHouseModel.Status      = Convert.ToInt32(dt.Rows[0]["Status"].ToString());
                    if (dt.Rows[0]["eDate"] == DBNull.Value)
                    {
                        _WareHouseModel.efDate = ConverDate(DateTime.Now);
                    }
                    else
                    {
                        _WareHouseModel.efDate = ConverDate(Convert.ToDateTime(dt.Rows[0]["eDate"]));
                    }
                }
            }
            catch (Exception ex)
            {
                PLog.Error("Error::Class > WareHouse, Method > EditWareHouse(int ID)", ex);
            }
            return(_WareHouseModel);
        }
コード例 #20
0
        public ProductsModel EditProdcut(int ID)
        {
            ProductsModel objProductsModel = new ProductsModel();

            try
            {
                DataTable dt = GetGridData(ID);

                if (dt != null && dt.Rows.Count > 0)
                {
                    objProductsModel.ProductID       = Convert.ToInt32(dt.Rows[0]["ID"].ToString());
                    objProductsModel.Code            = dt.Rows[0]["Code"].ToString();
                    objProductsModel.Name            = dt.Rows[0]["Name"].ToString();
                    objProductsModel.ProductCategory = Convert.ToInt32(dt.Rows[0]["ProductCategoryID"].ToString());
                    objProductsModel.Status          = Convert.ToInt32(dt.Rows[0]["Status"].ToString());
                    if (dt.Rows[0]["eDate"] == DBNull.Value)
                    {
                        objProductsModel.efDate = ConverDate(DateTime.Now);
                    }
                    else
                    {
                        objProductsModel.efDate = ConverDate(Convert.ToDateTime(dt.Rows[0]["eDate"]));
                    }

                    objProductsModel.Spec = dt.Rows[0]["Spec"].ToString();

                    objProductsModel.Price = Convert.ToDecimal(dt.Rows[0]["Price"].ToString());
                }
            }
            catch (Exception ex)
            {
                PLog.Error("Error::Class > Products, Method >EditProdcut(int ID)", ex);
            }
            return(objProductsModel);
        }
コード例 #21
0
        public BaseUnitTest(ITestOutputHelper testOutputHelper)
        {
            var factory = new LoggerFactory();

            factory.AddProvider(new UnitTestLoggerProvider(testOutputHelper));
            PLog.AssignLoggerFactory(factory);
        }
コード例 #22
0
        public long SaveProducts(ProductsModel _ProductsModel)
        {
            long flg = 0;

            try
            {
                ArrayList al = new ArrayList();


                al.Add(_ProductsModel.ProductID);
                al.Add(_ProductsModel.Code);
                al.Add(_ProductsModel.Name);
                al.Add(_ProductsModel.ProductCategory);
                al.Add(_ProductsModel.Status);
                al.Add(_ProductsModel.efDate);
                al.Add(_ProductsModel.Spec);

                _General.Set(al, "sp_InsertUpdateProducts", out flg);
                ///flg = DAL.ExecuteSP("sp_InsertUpdateProducts", Params, al);
            }
            catch (Exception ex)
            {
                PLog.Error("Error::Class > OutwardDocument, Method >SaveProducts()", ex);
            }
            return(flg);
        }
コード例 #23
0
        public string Getcustomers()
        {
            PLog.Info("BEGIN::Controller > Home, Method >LoadWarehouses ");

            List <Dictionary <string, object> > rows = new List <Dictionary <string, object> >();

            try
            {
                ICustomerImple oCustomerImple = new CustomerImple();
                DataTable      dt             = oCustomerImple.GetGridData(0); //0 will gets all the customers data

                Dictionary <string, object> row;
                foreach (DataRow dr in dt.Rows)
                {
                    row = new Dictionary <string, object>();
                    foreach (DataColumn col in dt.Columns)
                    {
                        row.Add(col.ColumnName, dr[col]);
                    }
                    rows.Add(row);
                }
            }
            catch (Exception ex)
            {
                PLog.Error("Error::Controller > Home, Method > LoadWarehouses()", ex);
            }
            PLog.Info("END::Controller > Home, Method > LoadWarehouses");
            return(Newtonsoft.Json.JsonConvert.SerializeObject(rows));
        }
コード例 #24
0
        public ActionResult Warehouse()
        {
            PLog.Info("BEGIN::Controller > Home, Method >Warehouse() ");
            WareHouseModel objModel = new WareHouseModel();

            PLog.Info("END::Controller > Home, Method > Warehouse()");
            return(View(objModel));
        }
コード例 #25
0
ファイル: PLogTests.cs プロジェクト: kath-bruce/PrimitiveBase
        public void TestPLogInitialisation()
        {
            Assert.NotNull(PLog.LoggerFactory);
            Assert.NotNull(PLog.Logger);

            Assert.NotNull(PLog.CreateLogger("UnitTestAnotherLogger"));
            Assert.NotNull(PLog.CreateLogger <PLogTests>());
        }
コード例 #26
0
ファイル: ErcXdbg.cs プロジェクト: hazedic/ERC.Xdbg-1
        public static bool PluginInit(Plugins.PLUG_INITSTRUCT initStruct)
        {
            if (!Plugins._plugin_registercommand(Plugins.pluginHandle, "ERC", RegisteredCommands.ErcCommand, false))
            {
                PLog.WriteLine("[ERC] error registering the \"ERC\" command!");
            }

            return(true);
        }
コード例 #27
0
        public static void CBCREATEPROCESS(Plugins.CBTYPE cbType, ref Plugins.PLUG_CB_CREATEPROCESS info)
        {
            var CreateProcessInfo = info.CreateProcessInfo.ToStruct <WAPI.CREATE_PROCESS_DEBUG_INFO>();
            var modInfo           = info.modInfo.ToStruct <WAPI.IMAGEHLP_MODULE64>();
            var DebugFileName     = info.DebugFileName.MarshalToString();
            var fdProcessInfo     = info.fdProcessInfo.ToStruct <WAPI.PROCESS_INFORMATION>();

            PLog.WriteLine("[DotNet TEST] Create process {0}", info.DebugFileName.MarshalToString());
        }
コード例 #28
0
ファイル: PLogTests.cs プロジェクト: kath-bruce/PrimitiveBase
            // Removing this test until test ordering is sorted out
            public void TestWhenLoggerIsNull()
            {
                var testex    = new ArgumentException("ARGEX");
                var testevent = new EventId(123);

                PLog.LogCritical("TEST1");
                PLog.LogCritical("TEST2 {0}", "PARAM2");
                PLog.LogCritical(testex, "TEST3 {0}", "PARAM3");
                PLog.LogCritical(testevent, "TEST4");
                PLog.LogCritical(testevent, testex, "TEST4");

                testex    = new ArgumentException("ARGEX");
                testevent = new EventId(123);

                PLog.LogDebug("TEST1");
                PLog.LogDebug("TEST2 {0}", "PARAM2");
                PLog.LogDebug(testex, "TEST3 {0}", "PARAM3");
                PLog.LogDebug(testevent, "TEST4");
                PLog.LogDebug(testevent, testex, "TEST4");

                testex    = new ArgumentException("ARGEX");
                testevent = new EventId(123);

                PLog.LogError("TEST1");
                PLog.LogError("TEST2 {0}", "PARAM2");
                PLog.LogError(testex, "TEST3 {0}", "PARAM3");
                PLog.LogError(testevent, "TEST4");
                PLog.LogError(testevent, testex, "TEST4");

                testex    = new ArgumentException("ARGEX");
                testevent = new EventId(123);

                PLog.LogInformation("TEST1");
                PLog.LogInformation("TEST2 {0}", "PARAM2");
                PLog.LogInformation(testex, "TEST3 {0}", "PARAM3");
                PLog.LogInformation(testevent, "TEST4");
                PLog.LogInformation(testevent, testex, "TEST4");

                testex    = new ArgumentException("ARGEX");
                testevent = new EventId(123);

                PLog.LogTrace("TEST1");
                PLog.LogTrace("TEST2 {0}", "PARAM2");
                PLog.LogTrace(testex, "TEST3 {0}", "PARAM3");
                PLog.LogTrace(testevent, "TEST4");
                PLog.LogTrace(testevent, testex, "TEST4");

                testex    = new ArgumentException("ARGEX");
                testevent = new EventId(123);

                PLog.LogWarning("TEST1");
                PLog.LogWarning("TEST2 {0}", "PARAM2");
                PLog.LogWarning(testex, "TEST3 {0}", "PARAM3");
                PLog.LogWarning(testevent, "TEST4");
                PLog.LogWarning(testevent, testex, "TEST4");
            }
コード例 #29
0
 public void GetStockReportData()
 {
     try
     {
         this.ds = _General.Get(new ArrayList(), "Sp_GetStockReportData", 0);
     }
     catch (Exception ex)
     {
         PLog.Error("Error::Class > StockReport, Method > GetStockReportData()", ex);
     }
 }
コード例 #30
0
        private static void plugsetup(ref Plugins.PLUG_SETUPSTRUCT setupStruct)
        {
            FunctionCode.globalVars.hMenu       = setupStruct.hMenu;
            FunctionCode.globalVars.hMenuDisasm = setupStruct.hMenuDisasm;
            FunctionCode.globalVars.hMenuDump   = setupStruct.hMenuDump;
            FunctionCode.globalVars.hMenuStack  = setupStruct.hMenuStack;
            FunctionCode.globalVars.hwndDlg     = setupStruct.hwndDlg;

            PLog.WriteLine(szprojectnameInfo); // Add some info of the plugin to the log
            FunctionCode.PlugIn_SetUp(setupStruct);
        }