Click here to Skip to main content
15,309,126 members

Comments by Eliza Maria (Top 28 by date)

Eliza Maria 13-Aug-20 12:35pm View
   
Thank you,that's what i wanted to know :D
Eliza Maria 13-Aug-20 12:25pm View
   
Thank you for your response.I don't actually understand what you're saying by that as i have the image which is form-data and the user details which are json format.I can't transfer the image to the server as json as it is received by the server as IFormFile and uploaded in a folder.
Eliza Maria 30-Jul-20 10:47am View
   
ok Sandeep,thanks for your help.I'll do that now.Best regards!
Eliza Maria 30-Jul-20 10:35am View
   
ok,so after I researched a little bit I have managed to find something that returns a 200 ok status code.However I have 2 things i can't put my finger on:
1.Although it returns "OK",the file is not saved in the folder on the server side.
2.As I have changed the method to take another parameter named "fileName" I'm not sure how to use it in the VM so that will actually get the image name.

I have updated the question with the new code I have right now for UploadPictureAsync() and UploadImage().Thank you again for your help in figuring out how to resolve this :)
Eliza Maria 30-Jul-20 10:11am View
   
Deleted
Thank you for your response Sandeep. It seems like it gets the image so it is not a null value but it returns an error "400 Bad request".
Eliza Maria 30-Jul-20 10:11am View
   
Thank you for your response Sandeep. It seems like it gets the image so it is not a null value but it returns an error "500 Bad request"
Eliza Maria 13-May-20 14:00pm View
   
Hi Richard!I finally figured it out.I changed my code so that in my baseviewmodel I create a reference to the model class and I assign the model class to the properties.After that I created the ViewModel and from that point on it was pretty easy and the code looks cleaner.This is the tutorial I followed:http://bsubramanyamraju.blogspot.com/2018/03/xamarinforms-mvvm-sqlite-sample-for.html .Thank you for your time :).Now I know what not to do when I am working with MVVM. Best regards!
Eliza Maria 13-May-20 7:12am View
   
Hi Richard!Thank you for your response.I believe you refer to what I have already tried as I did that and it still gave me the same error.I have tried this:
<StackLayout.BindingContext>
<l:RegistrationViewModel>
</StackLayout.BindingContext>
.Please let me know if i understood it wrong,but as far as I know this is how you create it.
Eliza Maria 12-Mar-20 10:23am View
   
Wow thanks!I can see that you're right.When I do that I get 401 Unauthorized access which means that the path is actually the good one.I forgot I am using the login controller and not the register controller.Thank you so much for all your help!!!Best regards!
Eliza Maria 12-Mar-20 10:01am View
   
ok sure!Thank you so much for your help!
Eliza Maria 12-Mar-20 9:52am View
   
Done!Please let me know if you need any additional info and again thank you for your help :)
Eliza Maria 12-Mar-20 9:47am View
   
The thing is that on the server side everything is in order.I set the properties of the controller by enabling CORS and the route for the api so there should not be any problem.As far as I understood and please correct me if I am wrong, this error has sth to do with the client side.
Eliza Maria 12-Mar-20 9:44am View
   
I am using .Net Core with Kestrel
Eliza Maria 12-Mar-20 9:39am View
   
Thank you for your help.It gives me the same error as in the browser which is 405 method not allowed and when i am trying to send the values it will not give any output for some reason...
Eliza Maria 12-Mar-20 9:27am View
   
Deleted
ok,will do!thanks for the help :)
Eliza Maria 12-Mar-20 8:05am View
   
Thank you for your response!Unfortunately I don't have the project with .aspx file extension,I work with the default angular project which does not contain a applicationHost.config file.I also have [HttpPost] method on the server side in the controller and the route set like this:Route[("login")].
Eliza Maria 27-Jun-18 5:12am View
   
Hello Mike,Thank you for your response.I have manage to solve my issue by deleting the Attending=0 from count where i store values into the db.That was the only problem that was stopping me from achieving the desired result.Thank you anyways for your time and support.Wish you all the best!
Eliza Maria 25-Jun-18 5:21am View
   
Thank you Amit for your help but i think you don't understand what i want exactly.I have a select statement which takes the values from one table (RegisterStudent) and displays it in a datagridview.The table has SN,sNr,fName and lName.The insert statement for the other table,AttendanceList has also the same values + dateArrival,dateDeparture,Departed,Attending and CourseID.When the insert statement is executed,the row for the select statement that had the same values (SN,sNr,fName,lName) will dissapear once the other record is inserted into the datagridview.I don't need a distinct record.This is only based on the view.
Eliza Maria 25-Jun-18 4:47am View
   
Thank you for your response.I have also tried this one.Is not working.I don't need a hash table in my code nor an Arraylist.I have a datatable and a dataset.I am connected to the database thorugh mysql server without any binding of any kind to the datagridview
Eliza Maria 24-Jun-18 10:43am View
   
Thank you for your response.Attending and departed are 2 separate flags.When I insert into the AttendanceList-which has SN(which is the student nr of the student)the PK-it inserts the dateArrival(with datetime)and updates the Attending bite to 1,leaving the Departed one 0.When the SN will be inserted the second time,it will update the dateDeparture and Departed flag will be 1 along with the Attending flag.I have tried with the syntax "ON duplicate key update" but this didn't work.Also I have used the count to determine if there is a duplicate key,in that key it should update.My problem is why is not working the updating part based on the duplicate key?Is my approach wrong?


Best regards
Eliza Maria 23-Jun-18 7:32am View
   
Thank you for answering.I can see that,since you don't understand what i'm trying to figure out,it makes it difficult for you also to give me an explanation.So,this is my logic in the code:
The query SqlCommand checkData = new SqlCommand("SELECT COUNT(dateArrival) FROM AttendanceList WHERE SN = @Id and Attending=0", cn);
inserts the data of the student into the AttendanceList table which is then displayed in the datagridview.Selecting the count in dateArrival is basically just a count that states that the Student is registered in RegisterStudent table with the info required,then the info from registerStudent will be inserted into the AttendanceList if the Serial nr from the textbox matches the serialnr in RegisterStudent(basically the record will be added based on dateTime).The Atteding=0 is logical that it has to be 0,because otherwise it means that the student is already attending that specific course.Indeed,the parameter ClassId and CourseID don't match but there are one and the same because parameter ClassId defines CourseId.There's no specification about what class is attending the student,but what course he's attending.Also,I don't understand what you mean by "It looks like there's a possibility in your logic where a record can exist but still fail the test."because this is the query for inserting data into AttendanceList,the other query checkData = new SqlCommand(
"update AttendanceList set Departed=@Departed, dateDeparture=@dateDeparture where SN=@SN", cn);
cn.Open();
is for updating the AttendanceList with dateDeparture and Departed which means that when the textbox will identify one more time the same serial nr,it should update the dateDeparture and Departed.I hope you understand my logic,because the part that you mentioned in your comments works perfectly,the update part is tricky.Please let me know if you understand why is that part not working.Best regards!
Eliza Maria 15-Jun-18 7:41am View
   
Yes,the SN is unique.Ok,I will try to do it this way.Thank you and I will let you know what i have done!Best regards!
Eliza Maria 15-Jun-18 6:48am View
   
Thank you for your response.I have am RFID card reader,so every time the student swipes the NFC tag on the card reader,it stores the data into the table based on the serial nr on the card reader.When it identifies the same value the second time,it will automatically update,checking the flag Departed.As you told me it is much better.Thank you sir!
Eliza Maria 15-Jun-18 4:49am View
   
Thank you for your response.Please look carefully because if you can see,it is in the table:[education] [nvarchar](50) NOT NULL and i need only that,not coursename nor courseid.These are totally different things.
Eliza Maria 14-Jun-18 16:55pm View
   
And I also declare the function in Form_Load,but it only loads the values into the combobox.
Eliza Maria 14-Jun-18 16:51pm View
   
I can't change the value from the combobox.If it starts on the default value "Item1" when i want to change to "item2" it won't work at all.
Eliza Maria 14-Jun-18 15:40pm View
   
And StudentId is the FK to RegisterStudent
Eliza Maria 14-Jun-18 15:33pm View
   
Thank you for your response.I tried but i get this error"System.NullReferenceException: 'Object reference not set to an instance of an object.'

System.Windows.Forms.ListControl.SelectedValue.get returned null.
"