public int DeleteAssetTransferDetails(AssetTransferDetailsListUI assetTransferDetailsListUI) { int result = 0; result = assetTransferDetailsListDAL.DeleteAssetTransferDetails(assetTransferDetailsListUI); return(result); }
public DataTable GetAssetTransferDetailsListBySearchParameters(AssetTransferDetailsListUI assetTransferDetailsListUI) { DataTable dtb = new DataTable(); dtb = assetTransferDetailsListDAL.GetAssetTransferDetailsListBySearchParameters(assetTransferDetailsListUI); return(dtb); }
public DataTable GetAssetTransferDetailsListById(AssetTransferDetailsListUI assetTransferDetailsListUI) { DataTable dtb = new DataTable(); dtb = assetTransferDetailsListDAL.GetAssetTransferDetailsListById(assetTransferDetailsListUI); return(dtb); }
private void BindListBySearchParameters(AssetTransferDetailsListUI assetTransferDetailsListUI) { try { DataTable dtb = assetTransferDetailsListBAL.GetAssetTransferDetailsListBySearchParameters(this.assetTransferDetailsListUI); if (dtb.Rows.Count > 0 && dtb != null) { gvData.DataSource = dtb; gvData.DataBind(); divError.Visible = false; gvData.Visible = true; } else { divError.Visible = true; lblError.Text = Resources.GlobalResource.msgNoRecordFound; gvData.Visible = false; } txtSearch.Text = ""; txtSearch.Focus(); } catch (Exception exp) { logExcpUIobj.MethodName = "BindListBySearchParameters()"; logExcpUIobj.ResourceName = "Finance_Asset__Accounting_Transfer_of_Assets_AssetTransferDetailsList.CS"; logExcpUIobj.RecordId = "All"; logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString(); logExcpDALobj.SaveExceptionToDB(logExcpUIobj); log.Error("[Finance_Asset__Accounting_Transfer_of_Assets_AssetTransferDetailsList : BindListBySearchParameters] An error occured in the processing of Record. Details : [" + exp.ToString() + "]"); } }
public DataTable GetAssetTransferDetailsListById(AssetTransferDetailsListUI assetTransferDetailsListUI) { DataSet ds = new DataSet(); DataTable dtbl = new DataTable(); //Boolean result = false; try { using (SqlConnection SupportCon = new SqlConnection(connectionString)) { SqlCommand sqlCmd = new SqlCommand("SP_AssetTransferDetails_SelectById", SupportCon); sqlCmd.CommandType = CommandType.StoredProcedure; sqlCmd.CommandTimeout = commandTimeout; sqlCmd.Parameters.Add("@tbl_AssetTransferDetailsId", SqlDbType.NVarChar); sqlCmd.Parameters["@tbl_AssetTransferDetailsId"].Value = assetTransferDetailsListUI.Tbl_AssetTransferDetailsId; using (SqlDataAdapter adapter = new SqlDataAdapter(sqlCmd)) { adapter.Fill(ds); } } if (ds.Tables.Count > 0) { dtbl = ds.Tables[0]; } } catch (Exception exp) { logExcpUIobj.MethodName = "getAssetTransferDetailsListById()"; logExcpUIobj.ResourceName = "AssetTransferDetailsListDAL.CS"; logExcpUIobj.RecordId = assetTransferDetailsListUI.Tbl_AssetTransferDetailsId; logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString(); logExcpDALobj.SaveExceptionToDB(logExcpUIobj); log.Error("[AssetTransferDetailsListDAL : getAssetTransferDetailsListById] An error occured in the processing of Record Id : " + assetTransferDetailsListUI.Tbl_AssetTransferDetailsId + ". Details : [" + exp.ToString() + "]"); } finally { ds.Dispose(); } return(dtbl); }
public int DeleteAssetTransferDetails(AssetTransferDetailsListUI assetTransferDetailsListUI) { int result = 0; try { using (SqlConnection SupportCon = new SqlConnection(connectionString)) { SupportCon.Open(); SqlCommand sqlCmd = new SqlCommand("SP_AssetTransferDetails_Delete", SupportCon); sqlCmd.CommandType = CommandType.StoredProcedure; sqlCmd.CommandTimeout = commandTimeout; sqlCmd.Parameters.Add("@tbl_AssetTransferDetailsId", SqlDbType.NVarChar); sqlCmd.Parameters["@tbl_AssetTransferDetailsId"].Value = assetTransferDetailsListUI.Tbl_AssetTransferDetailsId; result = sqlCmd.ExecuteNonQuery(); sqlCmd.Dispose(); SupportCon.Close(); } } catch (Exception exp) { logExcpUIobj.MethodName = "DeleteAssetTransferDetails()"; logExcpUIobj.ResourceName = "AssetTransferDetailsListDAL.CS"; logExcpUIobj.RecordId = assetTransferDetailsListUI.Tbl_AssetTransferDetailsId; logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString(); logExcpDALobj.SaveExceptionToDB(logExcpUIobj); log.Error("[AssetTransferDetailsListDAL : DeleteAssetTransferDetails] An error occured in the processing of Record Id : " + assetTransferDetailsListUI.Tbl_AssetTransferDetailsId + ". Details : [" + exp.ToString() + "]"); } return(result); }