C#

94K

Solutions

25K

Contributors

C# is an object-oriented programming language created in conjunction with Microsoft’s .NET framework. Compilation is usually done into the Microsoft Intermediate Language (MSIL), which is then JIT-compiled to native code (and cached) during execution in the Common Language Runtime (CLR).

Share tech news, updates, or what's on your mind.

Sign up to Post

Foo()
{
    Task.Run Bar();
}

Open in new window

Is it possible Bar() may run on the UI thread?
The documentation says Task.Run() queues Bar() to run on a ThreadPool thread.
Is the UI thread a ThreadPool thread?
If Foo() was run on the UI thread, is it possible Bar() might also run on the UI thread?
0
My HiddentFields are getting document.getElementById are not working as expected inside javascript in asp.net. Everytime I tried set a value for hidden field I get the following error

Uncaught TypeError : Cannot ready property 'value" of null


In the below code there is a javascript function loadfile().
This is the line where i am getting the error : document.getElementById("hAction").value = "";
if I move past that error the next step where i have to read/update value for a variable I am getting the above mentioned error. So looks like somewhere the variables are not getting set correctly

Here is my aspx code :

<%@ Page Language="C#"  MasterPageFile="~/MasterPage2.master" AutoEventWireup="true" CodeBehind="A.aspx.cs" Inherits="A" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<%@ MasterType VirtualPath="~/MasterPage2.master" %>

<asp:Content ID="Content2" ContentPlaceHolderID="CP1" runat="Server">


<meta http-equiv="Pragma" content="nocache">
<meta http-equiv="Expires" content="-1">
<title>Account Exception Upload</title>
<%--<script type="text/javascript" src="ccr_scripts.js"></script>--%>
<script type="text/javascript" src="/apps/jfunctions.js"></script>
<script type="text/javascript" src="/apps/jquery-1.11.1.min.js"></script>
<link rel="stylesheet" type="text/css" href="/apps/commonStyles.css" />

<script type="text/javascript">

var timerID = -1;

function cancelProcessing()
{
	if (confirm("Are you 

Open in new window

0
I have the following json string. how  to read it in c# FOR  LOOP?

{Employee:[{"principalfirstname":"xxx","principallastname":"xxx","principalmiddlename":"xxx","principalnameonbond":"xxx","principaldba":"xxx","principalentity":"USA","principalyearinbusiness":"xxx","principaltaxid":"","principaladdress":"xx","principalcity":"xxx","principalstate":"TN","principalzip":"111","principalcounty":"","principalphoneno":"xxx","principalemail":"","principalfaxno":"","vin":"","licenseplatenumber":"","driverlicensenumber":"","door":"","bondstate":"","bondamount":"","premium":"","bondterm":"","creditcardfullname":"","creditcardnumber":"55555555533331111","creditcardchargeamount":"","creditcardexpdatemm":"","creditcardexpdateyyyy":"","creditcardcvc":"","creditcardaddress":"","creditcardcity":"","creditcardstate":"","creditcardzip":""}]}

Open in new window

0
I am trying to integrate crysta reports into my c#  Application

I have visual studio 17 installed  and i have downloaded crystal reports  from SAP site and i am trying to follow

the instructions below:

EDIT: " To add Crystal Reports to Visual Studio you will first need to download the runtime from SAP. Most commom runtimes can be found here. Then you will have to add the CR to your toolbox in VS by choosing Tools -> choose Toolbox items. Make sure the .NET Frameworks Components tab is selected and scroll to the CrystalReport items. Check the items you want to add (CrystalReportViewer for sure) and click OK. After that the CR Viewer should be available to you in the Reporting section of your toolbox."

I just can not find where to add  Crystal Report Item ( in particular CrystalReportViewer  )

Below please find the screen where I am surpposed  to be adding CrystalReportViewer  from

Screen to Bring CrystalReportViewer into my ToolBox
It is  not Listed

How do i get CrystalReportViewer into my Visual Studio 17

Thanks

Olukay
0
Hi

How do you orderBy ReleeseDate  when returning person Information from the TMDB API

This returns the Movie Credits but isn't ordered
                     TMDbClient client = new TMDbClient("API KEY");

                     public DateTime dateTime { get; set; }
            // Set Default Date
            dateTime = DateTime.Parse("01 / 01 / 0001");
                var PersonKnownFor = client.GetPersonMovieCreditsAsync(TMDB_id).Result;
                foreach(var PKF in PersonKnownFor.Cast)
                {
                    
                    if (PKF.ReleaseDate != null)
                    {
                        dateTime = DateTime.Parse(PKF.ReleaseDate.ToString());
                    }

                }

Open in new window



                var PersonKnownFor = client.GetPersonMovieCreditsAsync(TMDB_id).Result;
                foreach(var PKF in PersonKnownFor.Cast.OrderBy(PersonKnownFor.Cast.d)  // I think you order it here but can't see how
                 {
                    
                    if (PKF.ReleaseDate != null)
                    {
                        dateTime = DateTime.Parse(PKF.ReleaseDate.ToString());
                    }
                  int Year = dateTime.Year;
                

Open in new window


Also

Hovering over ReleaseDate suggests it is a System Date Time object but to get at the year I had to do above unsure why
0
In my windows forms application, I have a list of items <Container> which are populated into a datagridview. Each container has a unique ID. As follows:

ui1
In the datagridview, I have a "Modify" button column that when clicked, transfers the properties of the selected container onto the textbox controls in my UI. As follows:

ui2
Question: Given the above, how do I update the properties of a container within my list?

Background code:

Container class:

public class Container
    {
        #region Properties

        // Unique container ID
        public string ContainerID { get; set; }
        // Container description
        public string Description { get; set; }
        // Container payload capacity - weight
        public double CapacityWeight { get; set; }
        // Container payload capacity - cube
        public double CapacityCube { get; set; }
        
        #endregion  

        #region Constructor

        // Default constructor
        public Container()
        {
            ContainerID = Extension.NewID();
        }

        #endregion
    }

Open in new window


List initialization:

// Create an initial arbitrary list of containers to choose from
BindingList<Container> Containers = new BindingList<Container>();

Open in new window


private void initContainers()
        {
            // Add some containers to the container list
            Containers.Add(new Container() { Description = "20FT GENERAL PURPOSE", CapacityWeight = 23.4, CapacityCube = 30 });
            Containers.Add(new Container() { Description = "40FT GENERAL PURPOSE", CapacityWeight = 24.5, CapacityCube = 60 });
            Containers.Add(new Container() { Description = "40FT GENERAL PURPOSE - HIGH CUBE", CapacityWeight = 25.0, CapacityCube = 70 });
            Containers.Add(new Container() { Description = "US CHEP TWO-WAY PALLET", CapacityWeight = 1.524, CapacityCube = 1.8 });
        }

Open in new window

0
How can i make the  switch statement below   more efficient

What i want is LoginDetails.staticfiscalyear  =  "xx"   DO  NOTHING

If LoginDetails.staticfiscalyear =  01  or 02 ................ 12   Then  runstatus = proccesor.PayrollYearStartRoutine();  // Annual clear records  

Currently I am having  to repeat same line   for 01  .....12   twelve time  as below

[switch (LoginDetails.staticfiscalyear)
                        {
                            case "xx":

                                break;
                            case "01":
                                runstatus = proccesor.PayrollYearStartRoutine();  // Annual clear records
                                break;
                            case "02":
                                runstatus = proccesor.PayrollYearStartRoutine();  // Annual clear records
                                break;
                            case "03":
                                runstatus = proccesor.PayrollYearStartRoutine();  // Annual clear records
                                break;
                            case "04":
                                runstatus = proccesor.PayrollYearStartRoutine();  // Annual clear records
                                break;
                            case "05":
                                runstatus = proccesor.PayrollYearStartRoutine();  // Annual clear records
                                break;
                            case "06":
0
Hi Experts,
I have the following Json data in a variable called msg.
How can I  retrieve the key from this data in C#? I want key = "FTPTest/14814-869.txt"

{"Records":[{"eventVersion":"2.1","eventSource":"aws:s3","awsRegion":"us-east-1","eventTime":"2019-09-10T18:10:38.264Z","eventName":"ObjectCreated:Copy",
"userIdentity":{"Test":"AWS:AIDQA"},"requestParameters":{"sourceIPAddress":"179.200.125.2"},
"responseElements":{"x-amz-request-id":"84DAA4BF1A632B7C","x-amz-id-2":"bwJ8Dyykahm16ixDw8VaAtDnriJzzBI+2s04BPQmLCyziAauHUJmVn7pQmuHXe6g="},
"s3":{"s3SchemaVersion":"1.0","configurationId":"Y2IwZjEwNGYtMjRhZi00MTE2LTlhZjMtN2JhMTNlOTg3ODVl","bucket":{"name":"Test",
"ownerIdentity":{"principalId":"AAQWT"},"arn":"arn:aws:s3:::Test"},
"object":{"key":"FTPTest/14814-869.txt","size":184,"eTag":"421b829bc2990a999c64","sequencer":"005D77E711"}}}]}

Open in new window


Thanks in advance!
0
I am trying to use jQuery SelectListActions in an Update Form.  I need to pass the results of the 2nd listbox to my controller.  I don't have a View Model for this View since I am updating data and already have the data populated on the form from a Table with a variable passed to it.  The 2nd List Box is not defined in the Model but I need to get the contents of it and pass to my controller.  Is there a way to do this?  I really just need to get a list of data from a Multi-Select List Box back to my controller.
0
Hi

Using the TMDB API
I have a User Control on a winform with a TvTitleLbl Label & TvPosterPictureBox

I've been strangling to extract the year from KnownForTV.FirstAirDate having finally got it working, is this the best way?
I'm now getting Error, "Object reference not set to an instance of an object" on both the Label & PictureBox when trying to set it's properties unsure why ?

TvTit.jpg
the proper lable.text will be "TvTitleLbl.Text = "TV: " + pKFTV.Name + " ( " + year.ToString() + " )";"  shortened it to debug

KnownForTV.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using MoviesDataModel;
using TMDbLib.Client;
using TMDbLib.Objects.General;
using TMDbLib.Objects.Movies;
using TMDbLib.Objects.TvShows;
using TMDbLib.Objects.Search;
using TMDbLib.Objects.People;

namespace FilmsDB
{
    public partial class KnownForTV : UserControl
    {
        TMDbClient client = new TMDbClient("API KEY");
        const string ImgPath = @"E:\Media\thumbs\Movies\";
        const string ImgURL = "https://image.tmdb.org/t/p/";
        const string OriginalImgPath = "http://image.tmdb.org/t/p/original";
        public string ThumbPhotoPath { get; set; }
        public string FullPhotoPath { get; set; }
        private KnownForTv pKFTV;



        public KnownForTV(KnownForTv pKFTV)

Open in new window

0
WPF DataGrid Australian Date format.

Hi from the code below - how can I get this to display in Australian Date format "dd/mm/yy hh:mm:ss" or "dd/mm/yyyy hh:mm:ss"?

I have even tried:

            var system_query = (from EventLogEntry logEntry in system_log.Entries
                                orderby logEntry.TimeGenerated descending
                                select new
                                {
                                    TimeGenerated = logEntry.TimeGenerated.ToString("dd/MM/yyyy hh:mm:ss"),
                                }).ToList();


However it does not sort correctly.

I have included the code below.

My preference is to have it Autogenerated.

Thanks,

Ward.

<Window x:Class="WPF_DateTest1.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:WPF_DateTest1"
        mc:Ignorable="d"
        Title="MainWindow" Height="473.297" Width="800">
    <Grid>
        <DataGrid x:Name="events_grid" Margin="44,27,48,0" Height="357" VerticalAlignment="Top" AutoGenerateColumns="True"/>
        <Button x:Name="Button_Test" Content="Button" HorizontalAlignment="Left" Margin="49,407,0,0" VerticalAlignment="Top" Width="75" Click="Button_Test_Click"/>

    

Open in new window

0
I have started a project which connects to a Facial Reader.
For the life of me, I can't seem to import the functions in this dll into Delphi.

This dll was written in C#.

The commadline:

%SystemRoot%\Microsoft.NET\Framework\v2.0.50727\regasm C:\Users\Public\Desktop\Riss.Devices.dll /tlb:C:\Users\Public\Desktop\riss.Devices.tlb

succeeds, but there are no exported functions in the resulting tlb - File.

Question is whether there is a Dll, which was written / adapted to Delphi?

If anyone has experience with this, I would REALLY appreciate your Input.
0
Hello Experts,

I'm new to MVC devlopment, I was using Viewbag to pass the data from my controller to JS(jquery function). I want to know how can I read the List data and then assign to my grid. This is the sample code, I was getting error while reading the ViewBag.MyList in my JS function. How can I do this so I can get the list object. Later part once I get the list object, then I will bind the data with the grid.

Controller
public async Task<ActionResult> TestData(
string resp = "";
 var test = new List<Tuple<int, string>>();
test.Add(new Tuple<int, string>(1, 'R1'));
test.Add(new Tuple<int, string>(2, 'R2'));

if (test.Count > 0) {
ViewBag.MyList= Newtonsoft.Json.JsonConvert.SerializeObject(test);
}

resp = "test";
}

Open in new window


JavaScript
$.ajax({
        type: 'post',
        url: url,
        processData: false,
        contentType: false,
        data: files,
        success: function (response) {

 if (response == 'test')
{
var testList= JSON.parse('@Html.Raw(ViewBag.MyList)');
}
}

Open in new window

0
I have a set of 100,000 random integers. How long does it take to determine the maximum value within the first 25,000, 50,000 and 100,000 integers?  Will processing 100,000 integers take 4 times longer than processing 25,000?

Here is my C# code:

Random radom = new Random();

int randomNumber = 0;

DateTime dtNow = DateTime.Now;

for (int i = 0; i < 100000; i++)
{
    // Search 25000
    //randomNumber = radom.Next(1, 25000);

    // Search 50000
    // randomNumber = radom.Next(1, 50000);

    // Search 100000
    randomNumber = radom.Next(1, 100000);
}

Console.WriteLine(randomNumber);
Console.WriteLine(dtNow.Second);
Console.ReadLine();

Open in new window


Am I do it right? How to calculate the time that I used to determine the maximum value?
0
Hello,

I'm getting some information and store them in different type of Lists like below; and i'm using same type/logic function to write these values to excel.

How can i put these lists to another list or do you suggest any alternative method i'll appreciate.

I putted functions for only 2 list the others are same.

Thanks.


            List<IScrSubVar> subvarList = ModelBase.GetSubvarList((IScrModelBase)Globals.MDL, true);
            List<IScrBody> bodyList = ModelBase.GetBodyList((IScrModelBase)Globals.MDL, true);
            // List<IScrCommReceiver> receiverList = ModelBase.GetReceiverList((IScrModelBase)Globals.MDL, true);
            // List<IScrCommSender>senderList = ModelBase.GetSenderList((IScrModelBase)Globals.MDL, true);
            // List<IScrConstraint> constraintList = ModelBase.GetConstrList((IScrModelBase)Globals.MDL, true);
            List<IScrControl> controlList = ModelBase.GetControlList((IScrModelBase)Globals.MDL, true);
            List<IScrCrossSection> xscList = ModelBase.GetXsectionList((IScrModelBase)Globals.MDL, true);
            List<IScrExcitation> excList = ModelBase.GetExcitList((IScrModelBase)Globals.MDL, true);
            List<IScrExpression> expList = ModelBase.GetExpressList((IScrModelBase)Globals.MDL, true);
            List<IScrInputFunction> ifctnList = ModelBase.GetIfctnList((IScrModelBase)Globals.MDL, true);
            List<IScrMarker> markerList = ModelBase.GetMarkerList((IScrModelBase)Globals.MDL, true);
 

Open in new window

0
I think this is probably linked to previous question  

Using TMDB API I have a ListView on a Winform showing a list of people from a search

I'm adding each Person to the item tag but am unable to retrieve the properties of the tag on selection

Thinking I needed to cast it to an object I created  public class FoundPerson by Paste as JSON form developers.themoviedb API

        private void DoSearch()
        {
            TMDbClient client = new TMDbClient("<API KEY>");
            var People = client.SearchPersonAsync(ActorName).Result;
            int id = default(int);
            foreach (var person in People.Results)
            {
                id = person.Id;
                if (person.ProfilePath == null)
                {
                    ThumbPhotoPath = ImgPath + "JohnWayneSml.png";
                    FullPhotoPath = ImgPath + "JohnWayneBig.png";

                }
                else
                {
                    ThumbPhotoPath = ImgURL + "w45" + person.ProfilePath;
                    FullPhotoPath = ImgURL + "original" + person.ProfilePath;
                }


                if (!imgResults.Images.ContainsKey(ThumbPhotoPath))
                    imgResults.Images.Add(ThumbPhotoPath, LoadImage(ThumbPhotoPath));
                ListViewItem item = new 

Open in new window

0
I'm running a query against an IQueryable object to remove some exclusions. There are two criteria

queryable.FeeGroup != exclusion.FeeGroup && queryable.Comment != exclusions.Comment

The query returns as if I had used the query... queryable.FeeGroup != exclusions.FeeGroup and seems to ignore the queryable.Comment != exclusions.Comment criteria

An interesting thing is that if I change the query from != to == then both the .FeeGroup and .Comment criteria are properly used

queryable.FeeGroup ==  exclusion.FeeGroup && queryable.Comment == exclusions.Comment

See video
https://www.screencast.com/t/5vSj0h81tub4
0
First time poster, hopefully it's okay.

I am developing a windows forms desktop application and am having some difficulty with my class design.  Based on the following background, I am seeking expert feedback and guidance on what I need to add to my shipment container class to allow for adding a container to a shipment?

As this is an ongoing project that will require further input, I thought it would be best to provide some background information to help articulate it's purpose.

Application structure and functional usage descriptions are defined follows:
 
Shipment
- Create a shipment.
- Update the attributes of a shipment.
- Delete a shipment.
- Provide a summary of the shipment details. i.e. Container count, Package count, Total weight, Total cube...

Shipment Container
- Create + Add a container to a shipment.
- Update the attributes of a container in a shipment.
- Delete a container from a shipment.
- List all containers in a shipment.
- List all packing quantities in a container.
- Track packing quantities and load utilization rates for each container.
- Provide a summary of load quantities and utilization rates for each container. i.e. Package count, Load weight, Load cube...

Shipment Container Package
- Create + Add a quantity of packages to a container.
- Update the attributes of a package container in a shipment.
- Delete a package from a container and/or all containers.
- List all packing quantities in a …
0
Hello Experts,

I have a exception (ORA-06502: PL/SQL: numeric or value error: character string buffer too small) when running Oracle PL/SQL pkg with out parameter. I have written some custom exception in my pkg  and assign value . Below is the sample code. The code returns to Exception block in my PL/SQL code and it works only if I assign single char to my return value i.e. p_errMsg  := 'A' in the exception block;

PL/SQL Code

 PROCEDURE TestMyCode(p_result OUT  NUMBER,
p_errMsg OUT  VARCHAR2)
IS

v_errorMessage VARCHAR2(1000);
v_Exp1 EXCEPTION;


BEGIN

--Success
p_result :=1;
  --Fails
   v_errorMessage := 'Failed';
    RAISE v_Exp1;
  EXCEPTION
        WHEN v_Exp1 THEN
         p_errMsg := v_errorMessage;  -- Fails
    
  [b] --p_errMsg  := 'A' -- Works if I uncomment this line and comment the above line[/b]


END TestMyCode;

Open in new window


C# Code

OracleParameter p_result = new OracleParameter("p_result", OracleDbType.Int64, ParameterDirection.Output);
 OracleParameter p_errMsg = new OracleParameter("p_errMsg ", OracleDbType.Varchar2, ParameterDirection.Output);
string cmd = "BEGIN Test.TestMyCode(:p_errMsg, :p_result); END;";
            await context.Database.ExecuteSqlCommandAsync(cmd, p_result, p_errMsg );

Open in new window


Please let me know what could be wrong.

Thanks,
ASPDEV
0
I have gridview in my asp.net form. there is an account number column in there which gets populated from a database. I want the entire account number to be masked with "*" and on mouse hover to the account number I want to see the actual account number. Can I please have an example for something like this.
0
Hi Experts,

I am trying to get the company name in document.ready function. Company name is available in the model.
 jQuery(document).ready(function () {
          var CompanyName =  @Model.Company;
}

Open in new window

When the @Model.Company is any number, for example "1111" then it works fine. But when it is coming as string like "TestCompany" I am getting the error  " Uncaught ReferenceError: TestCompany is not defined" .

Any suggestion what I am doing wrong?

Thanks in advance!
0
I have a need to perform two functions  to retrieve information about a person i'm guessing the error  is the same reason?

1st if the person ID isn't known I need to do a search by name
using the API  even if correct it gives back several hits
However it dose reveal what a person is "known_for" which is some of the information I'm after as is the person ID
You need the person's ID to reveal details like BIO

Is it possible to chain queries together?

In the code bellow I'm the errors listed

using System;

using TMDbLib.Client;
using TMDbLib.Objects.General;
using TMDbLib.Objects.Movies;
using TMDbLib.Objects.TvShows;
using TMDbLib.Objects.Search;

namespace TMDBTest
{
    class Program
    {
        static void Main(string[] args)
        {
        // Access to The Movie DB API
        TMDbClient client = new TMDbClient("2c8a02fa36fb5299dcd97bbc84609899");
            Console.WriteLine("Hello World!");
            var People = client.SearchPersonAsync("jessica alba").Result;

            foreach(var Person in People)
            {

            }
            // assuming you know the id of the  person

            

            var PersonKF = client.GetCreditsAsync("56731").Result;
            foreach(var PNF in PersonKF)
            {

            }

        }
    }
}

Open in new window


Errors
Error	CS1579	foreach statement cannot operate on variables of type 'SearchContainer<SearchPerson>' because 'SearchContainer<SearchPerson>' does not contain a public instance definition for 'GetEnumerator'


Error	CS1579	foreach statement cannot operate on variables of type 'Credit' because 'Credit' does not contain a public instance definition for 'GetEnumerator'	

Open in new window

0
Hello,

I'm trying to create a file type with special extension to work in my tool. The problem is there wll be comment lines starting with "!" and variables starting with %. You can see sample like below;

! ===================================================
      %EDITOR      = [$USER$]
      %DATE      = [$RUN_DATE$]
! Comment 1
! Comment 2
! Comment 3
! ===================================================
      %PATH      = [$FILE_PATH$]
      %FILENAME      = "C:/Test/test_file.mbs"

%EDITOR, %DATE, %PATH, %FILENAME are my variables and on the other side their values.

Anyone can explain me how can i do that?

Thanks.
0
I'm hoping someone can help me understand what's going on here and what I have to do to correct it.  I'm trying to upload a list of scanned data to a web service and keep getting the error: Argument 1: cannot convert from 'System.Collections.Generic.List<ProfilesScan.WSTori.CountDetails>' to 'ProfilesScan.WSTori.CountDetails[]  I've tried converting the list to an Array to no avail.  Here is the code:
if (NetworkCheck.IsInternet())
                    {
                        string path = Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal), "LocalData.db3");
                        var tablelistout = new SQLiteConnection(path);
                        var list = tablelistout.Table<EOMCountsheet>();
                        var data = new List<string>();

                        List<CountDetails> invCountList = new  List<CountDetails>();
                        foreach (var listing in list)
                        {
                            invCountList.Add(new CountDetails
                            {
                                InventoryCountSpecified = true,
                                InventoryCount = listing.InventoryCount,  
                                Location = listing.Location,
                                Part = listing.Part,
                                UniqueStamp = listing.UniqueStamp,
                                UserID = listing.UserID,
                            });
          

Open in new window

0
I am trying to run a transaction (of 2 scripts) which should either both succeed or fail
( each in a 3 step process in my c# application)

Step1  Instantiate a Payroll Processor and  calls the  first of the 2 script below
 runstatus = proccesor.writetolivefile();
 runstatus = proccesor.ClearParollTable();

Step2 The processor  calls " proccesor.writetolivefile();"  that just does  a delete  and insert in the same operation in a database
with the script below:

GlobalConfig.Connection.WriteToLiveFile(model);
 return writetolivefile();

There are no input or output parameters  just a delete  and insert in a database


Step3 The Delete and Insert Runs and If successful should  go back to Step1 to take the second line
withing the transaction.
I have tested this step3 and it works. It deletes the record i want and  inserts a new record generating the
correct Id.

The problem i have is that after Step3 runs successfully, instead of going back to take the next line  within the transaction loop
( ie  runstatus = proccesor.ClearParollTable();)  It keeps going back to step2 in an endless loop.

Why am i not able to get the application to go  back to the transaction loop and process the next step
ie   runstatus = proccesor.ClearParollTable();

(See  the Script for the 3 steps below)

STEP-1

 private void button2_Click(object sender, EventArgs e)
        {
            // Do TestRun Scripts  and Return the Errors if any
            MonthPayModel 

Open in new window

0

C#

94K

Solutions

25K

Contributors

C# is an object-oriented programming language created in conjunction with Microsoft’s .NET framework. Compilation is usually done into the Microsoft Intermediate Language (MSIL), which is then JIT-compiled to native code (and cached) during execution in the Common Language Runtime (CLR).