Skip to content

How to Pass Values from BAL to UI

Rejin Kpr

Rejin Kpr

Asked Dec 19, 2018, 8:20 PM EST1 answer
Share
LinkedInX
How to Pass values from Business logic to UI without creating class in Entity Layer
 
     I Have Returned the values from DAL to BLL using Data table . I want To pass the values from BLL to Presentation Layer inside of datalist . I Have Already used Eval binder inside datalist.
 
    Is it Possible to Pass the Values directly Witout creation class in Entity Layer.
 
   If Possible how to Pass the Values
 
   Else How to Pass Using Entity Layer Class.
 
   lease Explain ASAP... 

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    You should try like this it might be help full to you
     
    TypeScript
    //BAL shows below
    public DataTable select_insert_attendance_client_name_BAL(Cls_Attendance objCls_Attendance)
    {
    return obj_Attendance_DAL.select_insert_attendance_client_name_DAL(objCls_Attendance);
    }
    
    
    
    //DAL shows below
    
    public DataTable select_insert_attendance_client_name_DAL(Cls_Attendance objCls_Attendance)
    {
    DataTable objDataTable = new DataTable();
    try
    {
    DataSet objDataset;
    objDBLibrary = new DB_config();
    objDBLibrary._stringCommandText = "SP_S_insert_attendance_client_name";
    objDBLibrary._CommandType = CommandType.StoredProcedure;
    objSqlParameters = new SqlParameter[1];
    objSqlParameters[0] = new SqlParameter("@Authority", SqlDbType.NVarChar);
    objSqlParameters[0].Value = objCls_Attendance.Authority;
    objDataset = objDBLibrary.GetDataAdapter(objSqlParameters);
    if (objDataset != null && objDataset.Tables[0].Rows.Count > 0)
    {
    return objDataset.Tables[0];
    }
    }
    catch (Exception)
    {
    throw;
    }
    return objDataTable;
    }
    
    //presentation layer (controller)
    public ActionResult select_insert_attendance_client_name(Cls_Attendance objCls_Attendance)
    {
    DataTable dt;
    dt = obj_Attendance_BAL.select_insert_attendance_client_name_BAL(objCls_Attendance);
    string jsoon = JsonConvert.SerializeObject(dt);
    return Json(jsoon, JsonRequestBehavior.AllowGet);
    }
    0