private void btnload_Click(object sender, EventArgs e) { if (fncBlank() == true) { return; } dslist3 = new DataSet(); GTRLibrary.clsConnection clsCon = new GTRLibrary.clsConnection("GTRHRIS"); try { string sqlQuery = "Exec prcGetfrmRcv '" + cbofrmNm.Value + "','" + chkAll.Tag + "','" + cboYear.Value.ToString() + "','" + cboClas.Value + "'"; clsCon.GTRFillDatasetWithSQLCommand(ref dslist3, sqlQuery); dslist3.Tables[0].TableName = "FormData"; gridFrmRcv.DataSource = null; gridFrmRcv.DataSource = dslist3.Tables["FormData"]; } catch (Exception ex) { throw (ex); } finally { clsCon = null; } }
private void prcLoadList() { //var DaysInMonth = DateTime.DaysInMonth(DateTime.Now.Year, DateTime.Now.Month); //var lastDay = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DaysInMonth); //var firstDay = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1); //dtFrom.Value = firstDay; //dtTo.Value = lastDay; GTRLibrary.clsConnection clsCon = new GTRLibrary.clsConnection(); dsList = new System.Data.DataSet(); try { string sqlQuery = "Exec [prcGetManualAtt] " + Common.Classes.clsMain.intComId + ",'" + cboEmployee.Text.ToString() + "','" + clsProc.GTRDate(dtFrom.Value.ToString()) + "','" + clsProc.GTRDate(dtTo.Value.ToString()) + "', 0 "; clsCon.GTRFillDatasetWithSQLCommand(ref dsList, sqlQuery); dsList.Tables[0].TableName = "tblGrid"; dsList.Tables[1].TableName = "tblEmpID"; dsList.Tables[2].TableName = "tblShiftID"; gridList.DataSource = null; gridList.DataSource = dsList.Tables["tblGrid"]; } catch (Exception ex) { throw (ex); } finally { clsCon = null; } }
private void btnLoad_Click(object sender, EventArgs e) { GTRLibrary.clsConnection clsCon = new GTRLibrary.clsConnection(); dsList = new System.Data.DataSet(); DateTime lastDay = new DateTime(dtDate.DateTime.Year, dtDate.DateTime.Month, 1); lastDay = lastDay.AddMonths(1); lastDay = lastDay.AddDays(-(lastDay.Day)); dtDate.Value = lastDay; try { string sqlQuery = "Exec prcGetSalAdv 0," + Common.Classes.clsMain.intComId + ",1,'" + clsProc.GTRDate(dtDate.Value.ToString()) + "'"; clsCon.GTRFillDatasetWithSQLCommand(ref dsList, sqlQuery); dsList.Tables[0].TableName = "tblEmployee"; //dsList.Tables[1].TableName = "tblEmployeeID"; gridList.DataSource = null; gridList.DataSource = dsList.Tables["tblEmployee"]; //prcLoadCombo(); } catch (Exception ex) { throw (ex); } finally { clsCon = null; } }
private void prcLoadList() { GTRLibrary.clsConnection clsCon = new GTRLibrary.clsConnection(); dsList = new System.Data.DataSet(); try { string sqlQuery = "Exec [prcGetMobileDeduct] 0," + Common.Classes.clsMain.intComId + ""; clsCon.GTRFillDatasetWithSQLCommand(ref dsList, sqlQuery); dsList.Tables[0].TableName = "tblEmployee"; dsList.Tables[1].TableName = "tblEmployeeID"; //dsList.Tables[2].TableName = "Country"; gridList.DataSource = null; gridList.DataSource = dsList.Tables["tblEmployee"]; } catch (Exception ex) { throw (ex); } finally { clsCon = null; } }
private void btnPunch_Click(object sender, EventArgs e) { ArrayList arQuery = new ArrayList(); GTRLibrary.clsConnection clsCon = new GTRLibrary.clsConnection(); dsList = new System.Data.DataSet(); try { string sqlQuery = "Exec prcProcessPunchCheck " + Common.Classes.clsMain.intComId + ",'" + clsProc.GTRDate(dtFrom.Value.ToString()) + "','" + cboCode.Text.ToString() + "'"; clsCon.GTRFillDatasetWithSQLCommand(ref dsList, sqlQuery); if (dsList.Tables[0].Rows.Count == 0) { MessageBox.Show("Data Not Found"); } dsList.Tables[0].TableName = "Punch"; gridList.DataSource = null; gridList.DataSource = dsList.Tables["Punch"]; prcLoadList(); prcLoadCombo(); } catch (Exception ex) { throw (ex); } finally { clsCon = null; } }
private void prcLoadList() { GTRLibrary.clsConnection clsCon = new GTRLibrary.clsConnection(); dsList = new System.Data.DataSet(); try { string sqlQuery = "Exec [prcGetOTPermission] 0," + Common.Classes.clsMain.intComId + ",'" + optCriteria.Value + "','" + strValue + "','" + dtInputDate.Value.ToString() + "'"; clsCon.GTRFillDatasetWithSQLCommand(ref dsList, sqlQuery); dsList.Tables[0].TableName = "tblGrid"; dsList.Tables[1].TableName = "tblDept"; dsList.Tables[2].TableName = "tblSect"; dsList.Tables[3].TableName = "tblSubSect"; dsList.Tables[4].TableName = "tblBand"; dsList.Tables[5].TableName = "tblShift"; gridList.DataSource = null; gridList.DataSource = dsList.Tables["tblGrid"]; groupBoxCombo.Enabled = true; } catch (Exception ex) { throw (ex); } finally { clsCon = null; } }
private void prcLoadList() { GTRLibrary.clsConnection clsCon = new GTRLibrary.clsConnection(); dsList = new System.Data.DataSet(); try { string sqlQuery = "Exec [prcProssType] " + Common.Classes.clsMain.intComId + ",0"; clsCon.GTRFillDatasetWithSQLCommand(ref dsList, sqlQuery); dsList.Tables[0].TableName = "type"; dsList.Tables[1].TableName = "adminType"; dsList.Tables[2].TableName = "ComType"; gridList.DataSource = null; gridList.DataSource = dsList.Tables["type"]; } catch (Exception ex) { throw (ex); } finally { clsCon = null; } }
private void prcLoadList() { GTRLibrary.clsConnection clsCon = new GTRLibrary.clsConnection(); dsList = new System.Data.DataSet(); try { string sqlQuery = "Exec [prcGetSalPross] 0," + Common.Classes.clsMain.intComId + ""; clsCon.GTRFillDatasetWithSQLCommand(ref dsList, sqlQuery); dsList.Tables[0].TableName = "tblReligion"; dsList.Tables[1].TableName = "tblSalType"; dsList.Tables[2].TableName = "tblFestType"; dsList.Tables[3].TableName = "tblEmployee"; // dvGrid = dsList.Tables["tblGridList"].DefaultView; } catch (Exception ex) { throw ex; } finally { clsCon = null; } }
private void prcLoadData() { GTRLibrary.clsConnection clsCon = new GTRLibrary.clsConnection(); dsDetails = new System.Data.DataSet(); string sqlQuery = "", Option = ""; Option = gridRpt.ActiveRow.Cells["PName"].Value.ToString(); lblCaption.Text = Option + " Permission.."; try { sqlQuery = "Exec [prcGetEmpPermission] 1," + Common.Classes.clsMain.intComId + "," + Common.Classes.clsMain.intUserId + ",'" + Option + "'"; clsCon.GTRFillDatasetWithSQLCommand(ref dsDetails, sqlQuery); dsDetails.Tables[0].TableName = "tblData"; gridList.DataSource = null; gridList.DataSource = dsDetails.Tables["tblData"]; } catch (Exception ex) { MessageBox.Show(ex.Message); // throw; } }
private void prcDisplayDetails(string strParam) { GTRLibrary.clsConnection clsCon = new GTRLibrary.clsConnection(); dsDetails = new System.Data.DataSet(); try { string sqlQuery = "Exec prcGetSalAdv " + Int32.Parse(strParam) + "," + Common.Classes.clsMain.intComId; clsCon.GTRFillDatasetWithSQLCommand(ref dsDetails, sqlQuery); dsDetails.Tables[0].TableName = "tblSalAdv"; DataRow dr; if (dsDetails.Tables["tblSalAdv"].Rows.Count > 0) { dr = dsDetails.Tables["tblSalAdv"].Rows[0]; //this.txtAmt.Text = dr["Amount"].ToString(); //this.btnSave.Text = "&Update"; //this.btnDelete.Enabled = true; //this.cboEmpID.Enabled = false; } } catch (Exception ex) { throw (ex); } finally { clsCon = null; } }
private void prcLoadList() { GTRLibrary.clsConnection clsCon = new GTRLibrary.clsConnection(); dsList = new System.Data.DataSet(); cboSalDept.Value = 0; try { string sqlQuery = "Exec [prcGetManaulSalaryMng] 0," + Common.Classes.clsMain.intComId + ", '" + optCriteria.Value + "', '" + cboPross.Value + "','" + cboSalDept.Value + "',0 "; clsCon.GTRFillDatasetWithSQLCommand(ref dsList, sqlQuery); dsList.Tables[0].TableName = "tblGrid"; dsList.Tables[1].TableName = "tblPross"; dsList.Tables[2].TableName = "tblSalDept"; dsList.Tables[3].TableName = "tblEmp"; gridList.DataSource = null; gridList.DataSource = dsList.Tables["tblGrid"]; } catch (Exception ex) { throw (ex); } finally { clsCon = null; } }
private void prcloadlist() { if (fncBlankRe() == true) { return; } dslist4 = new DataSet(); GTRLibrary.clsConnection clsCon = new GTRLibrary.clsConnection("GTRHRIS"); try { string sqlQuery = "Exec prcGetfrmResult '" + cboyrnm.Value.ToString() + "'," + cboClsnm.Value + ""; clsCon.GTRFillDatasetWithSQLCommand(ref dslist4, sqlQuery); dslist4.Tables[0].TableName = "Result"; dslist4.Tables[1].TableName = "nm"; gridResult.DataSource = null; gridResult.DataSource = dslist4.Tables["Result"]; cbo.DataSource = null; cbo.DataSource = dslist4.Tables["nm"]; cbo.ValueMember = "id"; cbo.DisplayMember = "number"; cbo.Value = 1; } catch (Exception ex) { throw (ex); } finally { clsCon = null; } }
private void prcLoadList() { ArrayList arQuery = new ArrayList(); GTRLibrary.clsConnection clsCon = new GTRLibrary.clsConnection(); string sqlQuery = ""; dsList = new DataSet(); try { sqlQuery = "Exec prcGetIpAddressGTRTran 0," + Common.Classes.clsMain.intComId + ",'',0,''"; clsCon.GTRFillDatasetWithSQLCommand(ref dsList, sqlQuery); dsList.Tables[0].TableName = "Grid"; dsList.Tables[1].TableName = "tblSect"; dsList.Tables[2].TableName = "tblSex"; gridDetails.DataSource = null; gridDetails.DataSource = dsList.Tables["Grid"]; } catch (Exception ex) { throw (ex); } finally { clsCon = null; } }
private void PrcLoadList() { GTRLibrary.clsConnection clsCon = new GTRLibrary.clsConnection("GTRHRIS"); dsList = new DataSet(); string sqlQuery; try { sqlQuery = "Exec [prcgetBasiAddmsn] 0," + Common.Classes.clsMain.intComId + ""; clsCon.GTRFillDatasetWithSQLCommand(ref dsList, sqlQuery); dsList.Tables[0].TableName = "GridData"; dsList.Tables[1].TableName = "Class"; dsList.Tables[2].TableName = "LoadFormNm"; dsList.Tables[3].TableName = "ForMGrid"; dsList.Tables[4].TableName = "YarNm"; dsList.Tables[5].TableName = "Result"; dsList.Tables[6].TableName = "FormNo"; dsList.Tables[7].TableName = "Religion"; dsList.Tables[8].TableName = "Sessn"; dsList.Tables[9].TableName = "sex"; gridResult.DataSource = null; gridResult.DataSource = dsList.Tables["Result"]; //dsList.Tables["Pic"].Columns.Add("Pic", typeof (Bitmap)); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void prcLoadList() { GTRLibrary.clsConnection clsCon = new GTRLibrary.clsConnection(); dsList = new System.Data.DataSet(); try { string sqlQuery = "Exec rptTranLog " + Common.Classes.clsMain.intUserId + ", 0,0,'','','',''"; clsCon.GTRFillDatasetWithSQLCommand(ref dsList, sqlQuery); dsList.Tables[0].TableName = "UserList"; dsList.Tables[1].TableName = "tblEmp"; dsList.Tables[2].TableName = "tblType"; prcModifyDataset(); gridList.DataSource = null; gridList.DataSource = dsList.Tables["UserList"]; gridEmployeeID.DataSource = null; gridEmployeeID.DataSource = dsList.Tables["tblEmp"]; gridType.DataSource = null; gridType.DataSource = dsList.Tables["tblType"]; } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { clsCon = null; } }
private void prcLoadList() { GTRLibrary.clsConnection clsCon = new GTRLibrary.clsConnection(); dsList = new System.Data.DataSet(); try { string sqlQuery = "Exec [prcGetEmployeeTransfer] " + Common.Classes.clsMain.intComId + ", 0"; clsCon.GTRFillDatasetWithSQLCommand(ref dsList, sqlQuery); //Tab : Basic dsList.Tables[0].TableName = "tblempid"; dsList.Tables[1].TableName = "tblUnit"; if (Int32.Parse(clsMain.strRelationalId) != 0) { prcDisplayDetails(clsMain.strRelationalId); clsMain.strRelationalId = "0"; } } catch (Exception ex) { throw ex; } finally { clsCon = null; } }
private void prcDisplayDetails(string strParam) { GTRLibrary.clsConnection clsCon = new GTRLibrary.clsConnection(); dsDetails = new System.Data.DataSet(); try { string sqlQuery = "Exec [prcGetFixAttBuyer] " + Int32.Parse(strParam) + "," + Common.Classes.clsMain.intComId; clsCon.GTRFillDatasetWithSQLCommand(ref dsDetails, sqlQuery); dsDetails.Tables[0].TableName = "tblReleased"; DataRow dr; if (dsDetails.Tables["tblReleased"].Rows.Count > 0) { dr = dsDetails.Tables["tblReleased"].Rows[0]; this.txtId.Text = dr["relid"].ToString(); this.cboEmpID.Value = dr["empid"].ToString(); this.dtInputDate.Text = dr["reldate"].ToString(); this.btnSave.Text = "&Update"; this.btnDelete.Enabled = true; } } catch (Exception ex) { throw (ex); } finally { clsCon = null; } }
private void prcLoadList() { GTRLibrary.clsConnection clsCon = new GTRLibrary.clsConnection(); dsList = new System.Data.DataSet(); try { string sqlQuery = "Exec [prcGetFixAttBuyer] 0," + Common.Classes.clsMain.intComId + ",'" + optCriteria.Value + "','" + strValue + "','" + dtInputDate.Value.ToString() + "','" + dtInputDate.Value.ToString() + "' "; clsCon.GTRFillDatasetWithSQLCommand(ref dsList, sqlQuery); dsList.Tables[0].TableName = "tblGrid"; dsList.Tables[1].TableName = "tblEmpID"; dsList.Tables[2].TableName = "tblSect"; dsList.Tables[3].TableName = "tblShift"; dsList.Tables[4].TableName = "tblSts"; dsList.Tables[5].TableName = "tblShiftID"; //dsList.Tables[2].TableName = "Country"; gridList.DataSource = null; gridList.DataSource = dsList.Tables["tblGrid"]; dtTimeIn.Text = "00:00"; dtTimeOut.Text = "00:00"; dtOT.Text = "0.00"; } catch (Exception ex) { throw (ex); } finally { clsCon = null; } }
private void prcLoadList() { GTRLibrary.clsConnection clsCon = new GTRLibrary.clsConnection(); dsList = new System.Data.DataSet(); try { string sqlQuery = "Exec prcrptJobCard " + Common.Classes.clsMain.intComId + ""; clsCon.GTRFillDatasetWithSQLCommand(ref dsList, sqlQuery); dsList.Tables[0].TableName = "Tree"; dsList.Tables[1].TableName = "Grid"; dsList.Tables[2].TableName = "Sect"; dsList.Tables[3].TableName = "Line"; dsList.Tables[4].TableName = "Floor"; Tree.Nodes.Clear(); prcGenerateTreeView(Tree.Nodes, 0, dsList.Tables[0]); Tree.Select(); //Grid gridEmployee.DataSource = null; gridEmployee.DataSource = dsList.Tables["Grid"]; gridSect.DataSource = null; gridSect.DataSource = dsList.Tables["Sect"]; } catch (Exception ex) { throw (ex); } finally { clsCon = null; } }
private void btnPass_Click(object sender, EventArgs e) { GTRLibrary.clsConnection clsCon = new GTRLibrary.clsConnection("GTRHRIS"); string sqlQuery = ""; dsProcess = new System.Data.DataSet(); try { sqlQuery = "Exec [dbo].[prcAdmExamCalculation] '" + cboyrnm.Text + "' , '" + cboClsnm.Value.ToString() + "', '" + txtPassNo.Text + "' ,0 ,'Passed' ,0"; clsCon.GTRFillDatasetWithSQLCommand(ref dsProcess, sqlQuery); // prcClearData(); ////cboEmpID.Focus(); //prcLoadList(); //prcLoadCombo(); } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { sqlQuery = null; clsCon = null; } prcloadlist(); // [dbo].[prcAdmExamCalculation] @sesn smallDatetime , @Class int = 0, @marks float = 0 , @marks2 float = 0, @ProssType varchar(50) ,@waitingNo tinyint = 1 }
private void PrcLoadList2(int Template) { GTRLibrary.clsConnection clsCon = new GTRLibrary.clsConnection("GTRHRIS"); dsList2 = new DataSet(); string sqlQuery; try { sqlQuery = "Exec prcgetBasiAddmsn 0," + Common.Classes.clsMain.intComId + ",'', " + Template + ""; clsCon.GTRFillDatasetWithSQLCommand(ref dsList2, sqlQuery); dsList2.Tables[0].TableName = "GridData"; dsList2.Tables[1].TableName = "Class"; dsList2.Tables[2].TableName = "LoadFormNm"; dsList2.Tables[3].TableName = "ForMGrid"; dsList2.Tables[4].TableName = "YarNm"; dsList2.Tables[5].TableName = "Result"; dsList2.Tables[6].TableName = "FormNo"; dsList2.Tables[7].TableName = "Religion"; dsList2.Tables[8].TableName = "Pic"; dsList2.Tables[9].TableName = "PicBy"; dsList2.Tables[10].TableName = "Sessn"; dsList2.Tables[11].TableName = "FeeTemp"; dsList2.Tables[12].TableName = "EnrData"; dsList2.Tables[13].TableName = "Templateid"; dsList2.Tables[14].TableName = "Templatewith"; dsList2.Tables[15].TableName = "paysegment"; dsList2.Tables[16].TableName = "fee"; } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void btnWaiting_Click(object sender, EventArgs e) { //ArrayList arQuery = new ArrayList(); GTRLibrary.clsConnection clsCon = new GTRLibrary.clsConnection("GTRHRIS"); string sqlQuery = ""; dsProcess = new System.Data.DataSet(); try { //if (fncBlank()) //{ // return; //} sqlQuery = "Exec [dbo].[prcAdmExamCalculation] '" + cboyrnm.Text + "' , '" + cboClsnm.Value.ToString() + "', '" + txtWaitNoFrom.Text + "' ,'" + txtWaitNoTo.Text + "' ,'Waiting' ,'" + txtWaitingNo.Text + "'"; clsCon.GTRFillDatasetWithSQLCommand(ref dsProcess, sqlQuery); // prcClearData(); ////cboEmpID.Focus(); //prcLoadList(); //prcLoadCombo(); } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { sqlQuery = null; clsCon = null; } prcloadlist(); }
private void prcLoadList() { GTRLibrary.clsConnection clsCon = new GTRLibrary.clsConnection(); dsList = new System.Data.DataSet(); try { string sqlQuery = "Exec [prcGetEmpPermission] 0," + Common.Classes.clsMain.intComId + "," + Common.Classes.clsMain.intUserId + ",'0'"; clsCon.GTRFillDatasetWithSQLCommand(ref dsList, sqlQuery); dsList.Tables[0].TableName = "tblGrid"; dsList.Tables[1].TableName = "tblPName"; //dsList.Tables[2].TableName = "tblSect"; //dsList.Tables[3].TableName = "tblSubSect"; //dsList.Tables[4].TableName = "tblBand"; //dsList.Tables[5].TableName = "tblShift"; gridList.DataSource = null; gridList.DataSource = dsList.Tables["tblGrid"]; gridRpt.DataSource = null; gridRpt.DataSource = dsList.Tables["tblPName"]; } catch (Exception ex) { throw (ex); } finally { clsCon = null; } }
private void prcLoadList() { GTRLibrary.clsConnection clsCon = new GTRLibrary.clsConnection("GTRHRIS"); dsList = new System.Data.DataSet(); try { string sqlquary = "Exec prcGetFormSale " + Common.Classes.clsMain.intComId; clsCon.GTRFillDatasetWithSQLCommand(ref dsList, sqlquary); dsList.Tables[0].TableName = "Session"; dsList.Tables[1].TableName = "Class"; gridSession.DataSource = null; gridSession.DataSource = dsList.Tables["Session"]; gridClass.DataSource = null; gridClass.DataSource = dsList.Tables["Class"]; DateTime firstDay = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1); dtDateFrom.Value = firstDay; } catch (Exception ex) { throw (ex); } }
private void cboAddList_Click(object sender, EventArgs e) { if (fncBlank()) { return; } if (optCriteria.Value == "All") { Data = ""; } else if (optCriteria.Value == "EmpID") { Data = cboEmpID.Value.ToString(); } else if (optCriteria.Value == "Status") { Data = cboStatus.Text.ToString(); } GTRLibrary.clsConnection clsCon = new GTRLibrary.clsConnection(); dsDetails = new System.Data.DataSet(); try { string sqlQuery = "Exec [prcGetFixAttDriver] 1," + Common.Classes.clsMain.intComId + ",'" + optCriteria.Value + "','" + strValue + "','" + clsProc.GTRDate(dtInputDate.Value.ToString()) + "','" + clsProc.GTRDate(dtInputToDate.Value.ToString()) + "' "; clsCon.GTRFillDatasetWithSQLCommand(ref dsDetails, sqlQuery); dsDetails.Tables[0].TableName = "tblFixData"; gridList.DataSource = null; gridList.DataSource = dsDetails.Tables["tblFixData"]; if (dsDetails.Tables["tblFixData"].Rows.Count > 0) { btnFillData.Enabled = true; groupData.Enabled = true; cboStatus1.Text = "P"; dtTimeIn.Text = "00:00"; dtTimeOut.Text = "00:00"; dtOT.Text = "0.00"; } else { MessageBox.Show("No Data Found."); } } catch (Exception ex) { MessageBox.Show(ex.Message); // throw; } }
private void prcAutoUpdate() { GTRLibrary.clsConnection clsCon = new GTRLibrary.clsConnection(); System.Data.DataSet dsAutoupdate = new System.Data.DataSet(); try { string sqlQuery = "Select top(1) AutoDownload_ID,LuserID, FileName, FilePath,FileType, FileSourceName, IsDownLoad, VershionNo From tbl_AutoUpdate where IsDownLoad=0 Order by AutoDownload_ID Desc"; clsCon.GTRFillDatasetWithSQLCommand(ref dsAutoupdate, sqlQuery); dsAutoupdate.Tables[0].TableName = "AD"; if (dsAutoupdate.Tables["AD"].Rows.Count > 0) { DataRow dr = dsAutoupdate.Tables["AD"].Rows[0]; //string result = Consinment.FormEntry.Form1.ShowBox("Do you want to exit?", "Exit"); // Consinment.FormEntry.Form1 frm = new Consinment.FormEntry.Form1(ref ultraProgressBar1, labelPerc, labelDownloaded, labelSpeed);\ string str = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(); if (dr["IsDownLoad"].ToString().ToUpper() == "1" || dr["VershionNo"].ToString() == str) { return; } else { if (dr["Filepath"].ToString().ToUpper() == "EXE".ToUpper() || dr["Filepath"].ToString().ToUpper() == "ALL".ToUpper()) { Operation.FormEntry.frmAutoUpdate frm = new Operation.FormEntry.frmAutoUpdate(ref str, dr["VershionNo"].ToString(), dr["FileType"].ToString()); //frm.MdiParent = this; frm.StartPosition = FormStartPosition.CenterScreen; // frm.MdiParent = this; frm.Show(); this.WindowState = FormWindowState.Minimized; } else { str = "This"; Operation.FormEntry.frmAutoUpdate frm = new Operation.FormEntry.frmAutoUpdate(ref str, dr["VershionNo"].ToString(), dr["FileType"].ToString()); //frm.MdiParent = this; frm.StartPosition = FormStartPosition.CenterScreen; // frm.MdiParent = this; frm.Show(); this.WindowState = FormWindowState.Minimized; } } } } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { clsCon = null; } }
private void btnManualAtt_Click(object sender, EventArgs e) { dsDetails = new DataSet(); ArrayList arQuery = new ArrayList(); GTRLibrary.clsConnection clsCon = new GTRLibrary.clsConnection(); string sqlQuery = ""; try { string ReportPath = "", SQLQuery = "", DataSourceName = "DataSet1", FormCaption = ""; dsDetails = new DataSet(); //GTRLibrary.clsConnection clsCon = new GTRLibrary.clsConnection(); DataSourceName = "DataSet1"; FormCaption = "Report :: Daily Manual Attendance..."; ReportPath = Common.Classes.clsMain.AppPath + @"\Attendence\Reports\rptAttendFixed.rdlc"; SQLQuery = "Exec rptAttendFixedManual " + Common.Classes.clsMain.intComId + ", '" + clsProc.GTRDate(dtDateFrom.Value.ToString()) + "', '" + clsProc.GTRDate(dtDateFrom.Value.ToString()) + "' "; clsCon.GTRFillDatasetWithSQLCommand(ref dsDetails, SQLQuery); if (dsDetails.Tables[0].Rows.Count == 0) { MessageBox.Show("Data Not Found"); return; } dsDetails.Tables[0].TableName = "Manual"; gridExcel.DataSource = null; gridExcel.DataSource = dsDetails.Tables["Manual"]; clsReport.strReportPathMain = ReportPath; clsReport.dsReport = dsDetails; clsReport.strDSNMain = DataSourceName; Common.Classes.clsMain.strExtension = optFormat.Value.ToString(); Common.Classes.clsMain.strFormat = optFormat.Text.ToString(); FM.prcShowReport(FormCaption); } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { rptQuery = null; DataSourceName = null; ReportPath = null; clsCon = null; } }
private void prcDisplayDetails(string strParam) { dsEmpList = new System.Data.DataSet(); GTRLibrary.clsConnection clsCon = new GTRLibrary.clsConnection(); string sqlQuery = "", sqlQuery1 = ""; try { sqlQuery = "Exec [prcGetEmpRelIssuer] 1," + Common.Classes.clsMain.intComId + "," + Int32.Parse(strParam) + ""; clsCon.GTRFillDatasetWithSQLCommand(ref dsEmpList, sqlQuery); dsEmpList.Tables[0].TableName = "Details"; DataRow dr; if (dsEmpList.Tables["Details"].Rows.Count > 0) { dr = dsEmpList.Tables["Details"].Rows[0]; this.txtId.Text = dr["EmpId"].ToString(); this.txtEmpCode.Text = dr["EmpCode"].ToString(); this.txtName.Text = dr["EmpName"].ToString(); this.txtDesig.Text = dr["DesigName"].ToString(); this.txtSection.Text = dr["SectName"].ToString(); this.txtUnit.Text = dr["CompName"].ToString(); this.txtSalary.Text = dr["GS"].ToString(); this.dtJDate.Value = dr["dtJoin"]; this.dtRelDate.Value = dr["dtReleased"]; if (dr["EmpPicLocation"].ToString().Length > 0) { if ((EmpPic + "\\" + dr["EmpPicLocation"].ToString()).Length > 0) { if (File.Exists(EmpPic + "\\" + dr["EmpPicLocation"].ToString())) { picPreview.Image = new Bitmap(EmpPic + "\\" + dr["EmpPicLocation"].ToString()); } else { picPreview.Image = new Bitmap(EmpPic + "\\None.jpg"); } } else { picPreview.Image = null; } } } } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { clsCon = null; } }
private void ultraButton1_Click(object sender, EventArgs e) { if (optCriteria.Value == "ALL") { } else if (optCriteria.Value == "Dept") { Data = cboDept.Value.ToString(); } else if (optCriteria.Value == "Sec") { Data = cboSection.Value.ToString(); } else if (optCriteria.Value == "SubSec") { Data = cboSubSection.Value.ToString(); } else if (optCriteria.Value == "Band") { Data = cboBand.Text.ToString(); } else if (optCriteria.Value == "ShiftTime") { Data = cboShiftTime.Value.ToString(); } GTRLibrary.clsConnection clsCon = new GTRLibrary.clsConnection(); //dsDetails = new System.Data.DataSet(); try { string sqlQuery = "Exec [prcGetOTPermission] 1," + Common.Classes.clsMain.intComId + ",'" + optCriteria.Value + "','" + strValue + "','" + clsProc.GTRDate(dtInputDate.Value.ToString()) + "'"; clsCon.GTRFillDatasetWithSQLCommand(ref dsDetails, sqlQuery); dsDetails.Tables[0].TableName = "tblFixData"; gridList.DataSource = null; gridList.DataSource = dsDetails.Tables["tblFixData"]; if (dsDetails.Tables["tblFixData"].Rows.Count > 0) { btnFillData.Enabled = true; groupData.Enabled = true; txtOT.Value = "0.0"; } } catch (Exception ex) { MessageBox.Show(ex.Message); // throw; } }
private void btnExcelType_Click(object sender, EventArgs e) { dsDetails = new DataSet(); ArrayList arQuery = new ArrayList(); GTRLibrary.clsConnection clsCon = new GTRLibrary.clsConnection(); string SQLQuery = "", MenuId = "0"; MenuId = gridMenu.ActiveRow.Cells["MenuId"].Value.ToString(); SQLQuery = "Exec rptMenuList 1, '" + MenuId + "'"; clsCon.GTRFillDatasetWithSQLCommand(ref dsDetails, SQLQuery); dsDetails.Tables[0].TableName = "Rpt"; gridExcel.DataSource = null; gridExcel.DataSource = dsDetails.Tables["Rpt"]; DialogResult dlgRes = MessageBox.Show("Do You Want to Save the Data Sheet"); if (dlgRes != DialogResult.OK) { return; } SaveFileDialog dlgSurveyExcel = new SaveFileDialog(); dlgSurveyExcel.Filter = "Excel WorkBook (*.xls)|.xls"; dlgSurveyExcel.FileName = "Menu Permission List_" + DateTime.Now.ToShortDateString().Replace(@"/", "_"); dlgSurveyExcel.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); DialogResult dlgResSaveFile = dlgSurveyExcel.ShowDialog(); if (dlgResSaveFile == DialogResult.Cancel) { return; } Cursor.Current = Cursors.WaitCursor; Application.DoEvents(); UltraGridExcelExporter GridToToExcel = new UltraGridExcelExporter(); GridToToExcel.FileLimitBehaviour = FileLimitBehaviour.TruncateData; GridToToExcel.InitializeColumn += new InitializeColumnEventHandler(GridToToExcel_InitializeColumn); GridToToExcel.Export(gridExcel, dlgSurveyExcel.FileName); MessageBox.Show("Download complete."); }