Click here to Skip to main content
15,896,552 members

Comments by Hussain Javed (Top 70 by date)

Hussain Javed 23-Mar-16 1:33am View    
You can tell how can i use BookIDs variable values in create action method
Hussain Javed 21-Mar-16 1:11am View    
I don't want to hide the list box in the form,then how it possible.I don't know how to do it.please guide me.
Hussain Javed 16-Mar-16 1:44am View    
I am not getting values from list class to post method of create
here is my classes
public class CUSTOM_STUDENT_FEEALLOCATION_DETAIL
{

public long? Registration_Id { get; set; }
public long? Admission_No { get; set; }
public long? Class_Id { get; set; }
public long? Academic_Year_Id { get; set; }
public long? Book_ID { get; set; }
public string Academic_Year_Name { get; set; }
public string Book_category_Name { get; set; }
public string Period_Name { get; set; }
public string Book_Name { get; set; }
public DateTime? Issue_Date { get; set; }
public DateTime? returnDate { get; set; }
public bool? Status { get; set; }
public decimal? Final_Amount { get; set; }
public bool SELECTED_STUDENT { get; set; }
public long? issue_Return_Id { get; set; }
public long? book_category_id { get; set; }
public long? Academic_year_Id { get; set; }
public long Issue_Return_Id { get; set; }
public String STUDENT_NAME { get; set; }



}
public class CUSTOM_STUDENT_FEEALLOCTION_DATA
{
public List<custom_student_feeallocation_detail> CUSTOM_STUDENT_FEEALLOCATION_DETAIL { get; set; }

}
here is my method

[HttpPost]
public ActionResult Index(CUSTOM_STUDENT_FEEALLOCTION_DATA CUSTOM_STUDENT_FEEALLOCTION_DATAObj)
{

var Student_FeeallocationDetail = CUSTOM_STUDENT_FEEALLOCTION_DATAObj.CUSTOM_STUDENT_FEEALLOCATION_DETAIL;
var SelectStufeedetail = Student_FeeallocationDetail.Where(b => b.SELECTED_STUDENT == true).ToList();

CUSTOM_STU_DETAIL stuentdetail = new CUSTOM_STU_DETAIL();
try
{
foreach (var studentfeedatal in SelectStufeedetail)
{
var fee_set = db.Student_Issue_Book.Where(a => a.Book_Id == studentfeedatal.Book_ID && a.Registration_Id == studentfeedatal.Registration_Id).ToList();
if (fee_set.Count != 0)
{
Student_Issue_Book Student_Fee_AlloctionObj = new Student_Issue_Book();
Student_Fee_AlloctionObj.Last_Updated_Date = DateTime.Now.ToUniversalTime();
Student_Fee_AlloctionObj.Last_Updated_By = CurrentUserID;
Student_Fee_AlloctionObj.Creation_Date = DateTime.Now.ToUniversalTime();
Student_Fee_AlloctionObj.Created_By = CurrentUserID;
// Student_Fee_AlloctionObj.Book_Category_Id = studentfeedatal.Book_Category_Id;
Student_Fee_AlloctionObj.Book_Id = studentfeedatal.Book_ID;
Student_Fee_AlloctionObj.Class_Id = studentfeedatal.Class_Id;
Student_Fee_AlloctionObj.Status = false;
Student_Fee_AlloctionObj.Issue_Return_Id = studentfeedatal.Issue_Return_Id;
Student_Fee_AlloctionObj.Registration_Id = studentfeedatal.Registration_Id;
Student_Fee_AlloctionObj.Issue_Date = studentfeedatal.Issue_Date;
Student_Fee_AlloctionObj.Return_Date = DateTime.Now.ToUniversalTime();
Student_Fee_AlloctionObj.Academic_year_Id = studentfeedatal.Academic_year_Id;
Student_Fee_AlloctionObj.Delete_Flag = true;
//Student_Fee_AlloctionObj.Final_Amount = studentfeedatal.Final_Amount;
if (_CRUDrepository.UpdateObjectInfo(Student_Fee_AlloctionObj, "Issue_Return_Id"))
{
//_CRUDrepository.CreateNewObject(Student_Fee_AlloctionObj);
// return RedirectToAction("Index");
}

}
else
Hussain Javed 15-Mar-16 7:19am View    
i want to show the form design at front,how can i post word file to you
Hussain Javed 15-Mar-16 7:00am View    
I am not getting values at Student_Issue_BookObj of create method.
I have list box in which i get multiple books to one student.and want to save these books to same student with generating different id's in database.