Click here to Skip to main content
15,891,375 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Friends,

I am developing one inventory application using mvc3. i need to save textbox and gridvalue into database.

For Eg. MatReq No and Date in textbox. and Item details are in temp grid i need to save both values at same time. please any one help me

Thanks & Regards,
Vivek

What I have tried:

Models:
C#
public class MRHdr
   {
       [Key]
       public int Id { get; set; }
       public string MRNo { get; set; }
       public DateTime MRDate { get; set; }
       public string Remarks { get; set; }
       public string GetUser { get; set; }
       public string DelFlag { get; set; }
       public DateTime? GetDate { get; set; }
       public string CompCode { get; set; }
   }

   public class MRDtl
   {
       [Key]
       public int Id { get; set; }
       public string MRNo { get; set; }
       [Required(AllowEmptyStrings = false, ErrorMessage = "Item Name required!")]
       public string IRateCode { get; set; }
       public string ItemCode { get; set; }
       [Required(AllowEmptyStrings = false, ErrorMessage = "Quantity required!")]
       public int QtyRequested { get; set; }
   }
Posted
Updated 18-Jul-16 20:09pm
v2
Comments
Suvendu Shekhar Giri 19-Jul-16 2:05am    
What is the issue here?
Where is the code for "Save"?
Vivek.anand34 19-Jul-16 2:26am    
I didn't done code... i don't knw how to do it.. use one table means i done.. here two table how to two modals in one screen.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900