void DisPlayCandidates() { oImageConvert = new CommonFunction.CommonFunction(); if (TransactionType == eVariable.TransactionType.EDIT) { eVariable.sID = oMCandidate.UNIQUE_ID; txtCandidateID.Text = oMCandidate.UNIQUE_ID; txtFullname.Text = oMCandidate.FIRST_NAME + " " + oMCandidate.MIDDLE_NAME + " " + oMCandidate.LAST_NAME; txtAge.Text = oMCandidate.AGE.ToString(); txtDOB.Text = oMCandidate.DOB; txtContactNo.Text = oMCandidate.CONTACT_NO; txtAddress.Text = oMCandidate.ADDRESS; txtSection.Text = oMCandidate.SECTION; txtCourse.Text = oMCandidate.COURSE; txtPosition.Text = oMCandidate._Position.POSITION; txtParty.Text = oMCandidate._Party.PARTY; oStringUtility = new CommonFunction.CommonFunction(); if (oMCandidate.PROFILE_PIC != string.Empty) { pImage.Image = oImageConvert.BaseStringToImage(oStringUtility.DecompressString(oMCandidate.PROFILE_PIC)); } EDFields(true); } else { EDFields(false); } }
private void dgAddedList_CellClick(object sender, DataGridViewCellEventArgs e) { try { String sCandidateID = String.Empty; if (dgAddedList.Rows.Count > 0) { sCandidateID = dgAddedList.Rows[e.RowIndex].Cells[0].Value.ToString(); foreach (var iTem in oMVotedCandidatelst.Where(fw => fw.CANDIDATE_ID == sCandidateID).ToList()) { sElectionCode = iTem.ELECTION_CODE; txtStudentID.Text = iTem.CANDIDATE_ID; txtFname.Text = iTem.FIRST_NAME; txtMname.Text = iTem.MIDDLE_NAME; txtLname.Text = iTem.LAST_NAME; txtDOB.Text = iTem.DOB.ToString("yyyy-MM-dd"); txtAge.Text = iTem.AGE; txtPosition.Text = iTem.POSITION; txtParty.Text = iTem.PARTY; txtCourse.Text = iTem.COURSE; txtSection.Text = iTem.SECTION; oStringUtility = new CommonFunction.CommonFunction(); if (iTem.PROFILE_PIC.Trim() != String.Empty) { pImage.Image = oImageConvert.BaseStringToImage(oStringUtility.DecompressString(iTem.PROFILE_PIC)); } } } } catch (Exception ex) { } }
void LoadRecords() { if (eVariable.m_ActionType == eVariable.ACTION_TYPE.EDIT) { txtBorrowerID.Enabled = false; txtBorrowerID.Text = oMBorrower.PERSON_ID; txtFname.Text = oMBorrower.FIRST_NAME; txtMname.Text = oMBorrower.MIDDLE_NAME; txtLname.Text = oMBorrower.LAST_NAME; dtDOB.Value = Convert.ToDateTime(oMBorrower.DOB); txtAge.Text = oMBorrower.AGE; txtContactNo.Text = oMBorrower.CONTACT_NO; txtAddress.Text = oMBorrower.ADDRESS; oCommonFunction = new CommonFunction.CommonFunction(); oImageFunction = new CommonFunction.CommonFunction(); if (oMBorrower.PROFILE_PIC != string.Empty) { pImage.Image = oCommonFunction.BaseStringToImage(oImageFunction.DecompressString(oMBorrower.PROFILE_PIC)); } } else { txtBorrowerID.Focus(); } }
private void dgDetails_CellClick(object sender, DataGridViewCellEventArgs e) { try { if (dgDetails.Rows.Count > 0) { ClearFields(); oImageConvert = new CommonFunction.CommonFunction(); foreach (DataRow row in oCandidate.getCandidates("ID", dgDetails.Rows[e.RowIndex].Cells[0].Value.ToString()).Rows) { sElectionCode = row["ELECTION_CODE"].ToString(); txtStudentID.Text = row["CANDIDATE_ID"].ToString(); txtFname.Text = row["FIRST_NAME"].ToString(); txtMname.Text = row["MIDDLE_NAME"].ToString(); txtLname.Text = row["LAST_NAME"].ToString(); txtPosition.Text = row["POSITION"].ToString(); txtParty.Text = row["PARTY"].ToString(); txtDOB.Text = row["DOB"].ToString(); txtAge.Text = row["AGE"].ToString(); txtCourse.Text = row["COURSE"].ToString(); txtSection.Text = row["SECTION"].ToString(); oStringUtility = new CommonFunction.CommonFunction(); if (row["PROFILE_PIC"].ToString().Trim() != String.Empty) { pImage.Image = oImageConvert.BaseStringToImage(oStringUtility.DecompressString(row["PROFILE_PIC"].ToString())); } } } } catch (Exception ex) { } }
private void dgDetails_CellEnter(object sender, DataGridViewCellEventArgs e) { try { if (dgDetails.Rows.Count > 0) { txtStudentID.Text = dgDetails.Rows[e.RowIndex].Cells[0].Value.ToString(); txtFname.Text = dgDetails.Rows[e.RowIndex].Cells[1].Value.ToString(); txtMname.Text = dgDetails.Rows[e.RowIndex].Cells[2].Value.ToString(); txtLname.Text = dgDetails.Rows[e.RowIndex].Cells[3].Value.ToString(); txtDOB.Text = dgDetails.Rows[e.RowIndex].Cells[4].Value.ToString(); txtAge.Text = dgDetails.Rows[e.RowIndex].Cells[5].Value.ToString(); txtCourse.Text = dgDetails.Rows[e.RowIndex].Cells[6].Value.ToString(); txtSection.Text = dgDetails.Rows[e.RowIndex].Cells[7].Value.ToString(); txtPosition.Text = dgDetails.Rows[e.RowIndex].Cells[11].Value.ToString(); txtParty.Text = dgDetails.Rows[e.RowIndex].Cells[13].Value.ToString(); oStringUtility = new CommonFunction.CommonFunction(); oImageConvert = new CommonFunction.CommonFunction(); if (dgDetails.Rows[e.RowIndex].Cells[14].Value.ToString() != string.Empty) { pImage.Image = oImageConvert.BaseStringToImage(oStringUtility.DecompressString(dgDetails.Rows[e.RowIndex].Cells[14].Value.ToString())); } } } catch (Exception ex) { } }