private void reportopen_LinkClicked(object sender, NavBarLinkEventArgs e) { mdlReportList mdlReportList = new mdlReportList(); mdlReportList.ReportType = e.Link.Caption.ToString(); frmReportList rptModuleList = new frmReportList(mdlReportList); rptModuleList.ShowDialog(); }
public frmReportList(mdlReportList reportList) { obj_mdlReportlist = reportList; InitializeComponent(); }
public DataTable GetReportListDetail(mdlReportList reportlist,string userid) { DataTable dt = new DataTable(); dt = obj_ReportList.GetReportListDetail(reportlist,userid); return dt; }
public DataTable GetReportListDetail(mdlReportList reportlist,string userid) { DataTable dt = new DataTable(); try { SqlCommand cmd = new SqlCommand("stp_ERP_ReportList", conn); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@ReportType", SqlDbType.VarChar, 50).Value = reportlist.ReportType; //cmd.Parameters.Add("@userid", SqlDbType.VarChar, 6).Value = userid; SqlDataAdapter ad = new SqlDataAdapter(cmd); conn.Open(); ad.Fill(dt); if (conn.State == ConnectionState.Open) { conn.Close(); } } catch (Exception) { MessageBox.Show(" Please contact system administrator!", "Babar Medicine Company Lahore - ERP ", MessageBoxButtons.OK, MessageBoxIcon.Error); } return dt; }