private void ViewJobsInTable() { string sTable = "<tbody>"; API.Service jobInfo = new API.Service(); XmlDocument xmldoc = new XmlDocument(); //xmldoc.LoadXml("<XML>" + jobInfo.get_JobView("*****@*****.**", "ferivan", "2", "", "", "", "", "", "", "").InnerXml + "</XML>"); xmldoc.LoadXml("<XML>" + jobInfo.get_Jobs("", Session["Email"].ToString(), Session["P@ss"].ToString(), "", Session["UserID"].ToString(), Session["ClientID"].ToString()).InnerXml + "</XML>"); XmlNodeList Response = xmldoc.SelectNodes("XML/RESPONSE/JOBS "); sTable = ""; int CountRows = 1; string _sBackground = ""; for (int intCount = 0; intCount < Response.Count; intCount++) { sTable = sTable + "<tr " + _sBackground + ">"; sTable = sTable + "<td>" + CountRows + "</td>"; if (Response[intCount].SelectSingleNode("URGENT").InnerText == "1") { sTable = sTable + "<td style=color:red><blink>" + "Urgent" + "</blink> </td> "; sTable = sTable + "<td style=color:red><a style=color:red href='Client_Job_Details.aspx?jopen=Y&p=JV&jobID=" + Response[intCount].SelectSingleNode("JOB_ALIAS").InnerText + "'>" + Response[intCount].SelectSingleNode("JOB_ALIAS").InnerText + "</td>"; sTable = sTable + "<td style=color:red>" + func.FixString(Server.HtmlDecode(Response[intCount].SelectSingleNode("JOB_TITLE").InnerText)) + "</td> "; sTable = sTable + "<td style=color:red>" + Response[intCount].SelectSingleNode("JOB_LOCATION").InnerText.Replace(",Canada", "") + " </td> "; sTable = sTable + "<td style=color:red>" + DateTime.Parse(Response[intCount].SelectSingleNode("CONTRACT_START_DATE").InnerText).ToString("dd MMM, yyyy") + " </td> "; sTable = sTable + "<td style=color:red>" + DateTime.Parse(Response[intCount].SelectSingleNode("CONTRACT_END_DATE").InnerText).ToString("dd MMM, yyyy") + " </td> "; sTable = sTable + "<td style=color:red>" + Response[intCount].SelectSingleNode("NO_OF_OPENINGS").InnerText + " </td> "; sTable = sTable + "<td style=color:red>" + Response[intCount].SelectSingleNode("HIRED").InnerText + " </td> "; sTable = sTable + "<td style=color:red>" + Response[intCount].SelectSingleNode("AVAILABLE_JOBS").InnerText + " </td> "; sTable = sTable + "<td style=color:red>" + Response[intCount].SelectSingleNode("RECENT").InnerText + " day(s)</td> "; sTable = sTable + "<td style=color:red>" + Response[intCount].SelectSingleNode("USERNAME").InnerText + " </td> "; sTable = sTable + "</tr>"; } else { sTable = sTable + "<td>" + Response[intCount].SelectSingleNode("JOB_STATUS").InnerText + "</td>"; sTable = sTable + "<td><a href='Client_Job_Details.aspx?jopen=Y&p=JV&jobID=" + Response[intCount].SelectSingleNode("JOB_ALIAS").InnerText + "'>" + Response[intCount].SelectSingleNode("JOB_ALIAS").InnerText + "</td>"; sTable = sTable + "<td>" + Server.HtmlDecode(Response[intCount].SelectSingleNode("JOB_TITLE").InnerText) + "</td> "; sTable = sTable + "<td>" + Response[intCount].SelectSingleNode("JOB_LOCATION").InnerText.Replace(",Canada", "") + " </td> "; sTable = sTable + "<td>" + DateTime.Parse(Response[intCount].SelectSingleNode("CONTRACT_START_DATE").InnerText).ToString("dd MMM, yyyy") + " </td> "; sTable = sTable + "<td>" + DateTime.Parse(Response[intCount].SelectSingleNode("CONTRACT_END_DATE").InnerText).ToString("dd MMM, yyyy") + " </td> "; sTable = sTable + "<td>" + Response[intCount].SelectSingleNode("NO_OF_OPENINGS").InnerText + " </td> "; sTable = sTable + "<td>" + Response[intCount].SelectSingleNode("HIRED").InnerText + " </td> "; sTable = sTable + "<td>" + Response[intCount].SelectSingleNode("AVAILABLE_JOBS").InnerText + " </td> "; sTable = sTable + "<td>" + Response[intCount].SelectSingleNode("RECENT").InnerText + " day(s)</td> "; sTable = sTable + "<td>" + Response[intCount].SelectSingleNode("USERNAME").InnerText + " </td> "; sTable = sTable + "</tr>"; } CountRows++; } sTable = sTable + "</tbody>"; jobInfo.Dispose(); lblTableData.Text = sTable; }
private void ViewcandidateInTable() { string sTable = "<tbody>"; API.Service getWorkers = new API.Service(); // API.Service getWorkers = new API.Service(); XmlDocument dom1 = new XmlDocument(); dom1.LoadXml("<XML>" + getWorkers.get_employees(Session["Email"].ToString(), Session["P@ss"].ToString(), "", "", Session["ClientID"].ToString(), "", "", "1", "").InnerXml + "</XML>"); XmlNodeList Response = dom1.SelectNodes("XML/RESPONSE/EMPLOYEE_NAME_ID"); int CountRows = 1; sTable = ""; string _sBackground = ""; for (int iResponse = 0; iResponse < Response.Count; iResponse++) { if (CountRows % 2 >= 1) { //enableordisable = ""; _sBackground = "bgcolor='#ECF0F1'"; } else { // enableordisable = "disabled"; _sBackground = ""; } string worker_status = Response[iResponse].SelectSingleNode("CANDIDATE_APPROVE").InnerText; DateTime candidate_start_date = DateTime.Parse(Response[iResponse].SelectSingleNode("STARTDATE").InnerText); DateTime job_start_date = DateTime.Parse(Response[iResponse].SelectSingleNode("CONTRACT_START_DATE").InnerText); DateTime thisday = DateTime.Today; if (worker_status == "1" && (candidate_start_date <= thisday)) { sTable = sTable + "<tr " + _sBackground + ">"; sTable = sTable + "<td>" + CountRows + "</td>"; //sTable = sTable + "<td>" + Response[iResponse].SelectSingleNode("ACTIVE").InnerText + " </TD>"; sTable = sTable + "<td><a href='Client_View_Worker_detail.aspx?wopen=Y&p=VW&empid=" + Response[iResponse].SelectSingleNode("EMPLOYEE_ID").InnerText + "'>" + Response[iResponse].SelectSingleNode("EMPLOYEE_ID").InnerText + "</a> </td> "; sTable = sTable + "<td>" + func.FixString(Response[iResponse].SelectSingleNode("FIRSTNAME").InnerText + " " + Response[iResponse].SelectSingleNode("LASTNAME").InnerText) + "</td> "; sTable = sTable + "<td>" + func.FixString(Response[iResponse].SelectSingleNode("JOB_TITLE").InnerText) + " </td> "; sTable = sTable + "<td>" + func.FixString(Response[iResponse].SelectSingleNode("LOCATION").InnerText) + " </td> "; sTable = sTable + "<td>" + DateTime.Parse(Response[iResponse].SelectSingleNode("STARTDATE").InnerText).ToString("dd MMM, yyyy") + " </td> "; sTable = sTable + "<td>" + DateTime.Parse(Response[iResponse].SelectSingleNode("ENDDATE").InnerText).ToString("dd MMM, yyyy") + " </td> "; sTable = sTable + "</tr>"; CountRows++; } } sTable = sTable + "</tbody>"; getWorkers.Dispose(); lblTableData.Text = sTable; }
private void ViewworkerInTable() { string sTable = "<tbody>"; API.Service getWorkers = new API.Service(); // API.Service getWorkers = new API.Service(); XmlDocument dom1 = new XmlDocument(); dom1.LoadXml("<XML>" + getWorkers.get_worker(Session["Email"].ToString(), Session["P@ss"].ToString(), Session["VendorID"].ToString(), Session["ClientID"].ToString()).InnerXml + "</XML>"); XmlNodeList Response = dom1.SelectNodes("XML/RESPONSE/EMPLOYEE_NAME_ID"); int CountRows = 1; sTable = ""; string _sBackground = ""; for (int iResponse = 0; iResponse < Response.Count; iResponse++) { if (iResponse % 2 >= 1) { //enableordisable = ""; _sBackground = "bgcolor='#ECF0F1'"; } else { // enableordisable = "disabled"; _sBackground = ""; } sTable = sTable + "<tr " + _sBackground + ">"; sTable = sTable + "<td>" + CountRows + "</td>"; //sTable = sTable + "<td>" + Response[iResponse].SelectSingleNode("ACTIVE").InnerText + " </TD>"; sTable = sTable + "<td><a href='Client_View_Worker_detail.aspx?wopen=Y&p=VW&empid=" + Response[iResponse].SelectSingleNode("EMPLOYEE_FULL_ID").InnerText + "'>" + Response[iResponse].SelectSingleNode("EMPLOYEE_FULL_ID").InnerText + "</a> </td> "; sTable = sTable + "<td>" + func.FixString(Response[iResponse].SelectSingleNode("FIRSTNAME").InnerText + " " + Response[iResponse].SelectSingleNode("LASTNAME").InnerText) + "</td> "; sTable = sTable + "<td>" + func.FixString(Response[iResponse].SelectSingleNode("JOB_TITLE").InnerText) + " </td> "; sTable = sTable + "<td>" + func.FixString(Response[iResponse].SelectSingleNode("LOCATION").InnerText) + " </td> "; sTable = sTable + "<td>" + DateTime.Parse(Response[iResponse].SelectSingleNode("START_DATE").InnerText).ToString("dd MMM, yyyy") + " </td> "; sTable = sTable + "<td>" + DateTime.Parse(Response[iResponse].SelectSingleNode("END_DATE").InnerText).ToString("dd MMM, yyyy") + " </td> "; sTable = sTable + "</tr>"; CountRows++; } sTable = sTable + "</tbody>"; getWorkers.Dispose(); lblTableData.Text = sTable; }
private void ViewJobsInTable() { string sTable = "<tbody>"; API.Service jobInfo = new API.Service(); XmlDocument xmldoc = new XmlDocument(); //xmldoc.LoadXml("<XML>" + jobInfo.get_JobView("*****@*****.**", "ferivan", "2", "", "", "", "", "", "", "").InnerXml + "</XML>"); xmldoc.LoadXml("<XML>" + jobInfo.get_Jobs("", Session["Email"].ToString(), Session["P@ss"].ToString(), "", Session["UserID"].ToString(), Session["ClientID"].ToString()).InnerXml + "</XML>"); XmlNodeList Response = xmldoc.SelectNodes("XML/RESPONSE/JOBS "); sTable = ""; int CountRows = 1; string _sBackground = ""; for (int intCount = 0; intCount < Response.Count; intCount++) { //wrap text for title string original_jobtitle = Response[intCount].SelectSingleNode("JOB_TITLE").InnerText; string job_title = ""; if (original_jobtitle.Length > 10) { job_title = original_jobtitle.Substring(0, original_jobtitle.Length); } else { job_title = original_jobtitle; } string urgent_job = Response[intCount].SelectSingleNode("URGENT").InnerText; if (intCount % 2 >= 1) { //enableordisable = ""; _sBackground = "bgcolor='#ECF0F1'"; } else { // enableordisable = "disabled"; _sBackground = ""; } if (urgent_job == "1") { sTable = sTable + "<tr " + _sBackground + ">"; sTable = sTable + "<td style=color:red><blink>" + "Urgent" + "</blink> </td> "; sTable = sTable + "<td style=color:red><a target='_blank' style=color:red href='Client_Job_Details.aspx?jopen=Y&p=JV&jobID=" + Response[intCount].SelectSingleNode("JOB_ALIAS").InnerText + "'>" + Response[intCount].SelectSingleNode("JOB_ALIAS").InnerText + "</td>"; //sTable = sTable + "<td style=color:red>" + Response[intCount].SelectSingleNode("JOB_TITLE").InnerText.ToString() + "</td> "; sTable = sTable + "<td style=color:red>" + func.FixString(job_title) + "</td> "; sTable = sTable + "<td style=color:red>" + Response[intCount].SelectSingleNode("JOB_LOCATION").InnerText.Replace(",Canada", "") + " </td> "; sTable = sTable + "<td style=color:red>" + Response[intCount].SelectSingleNode("NO_OF_OPENINGS").InnerText + " </td> "; // sTable = sTable + "<td style=color:red>" + Response[intCount].SelectSingleNode("RECENT").InnerText + " day(s)</td> "; sTable = sTable + "<td style=color:red>" + DateTime.Parse(Response[intCount].SelectSingleNode("CONTRACT_START_DATE").InnerText).ToString("dd MMM, yyyy") + " </td> "; } else { sTable = sTable + "<tr " + _sBackground + ">"; sTable = sTable + "<td>" + Response[intCount].SelectSingleNode("JOB_STATUS").InnerText + " </td> "; sTable = sTable + "<td><a target='_blank' href='Job_Details.aspx?jopen=Y&p=JV&jobID=" + Response[intCount].SelectSingleNode("JOB_ALIAS").InnerText + "'>" + Response[intCount].SelectSingleNode("JOB_ALIAS").InnerText + "</td>"; //sTable = sTable + "<td>" + Response[intCount].SelectSingleNode("JOB_TITLE").InnerText.ToString() + "</td> "; sTable = sTable + "<td>" + func.FixString(job_title) + "</td> "; sTable = sTable + "<td>" + Response[intCount].SelectSingleNode("JOB_LOCATION").InnerText.Replace(",Canada", "") + " </td> "; sTable = sTable + "<td>" + Response[intCount].SelectSingleNode("NO_OF_OPENINGS").InnerText + " </td> "; // sTable = sTable + "<td>" + Response[intCount].SelectSingleNode("RECENT").InnerText + " day(s)</td> "; sTable = sTable + "<td>" + DateTime.Parse(Response[intCount].SelectSingleNode("CONTRACT_START_DATE").InnerText).ToString("dd MMM, yyyy") + " </td> "; sTable = sTable + "</tr>"; CountRows++; } //closes sTable = sTable + "</tbody>"; jobInfo.Dispose(); lblTableData.Text = sTable; } }
protected void Page_Load(object sender, EventArgs e) { string sTable = ""; //get timesheet if (Session["Email"] == null) { //logout Session.Abandon(); Response.Redirect("Login.aspx?m=You+have+logged+out"); Response.End(); } conn = new SqlConnection(WebConfigurationManager.ConnectionStrings["dbconn"].ConnectionString); API.Service jobInfo2 = new API.Service(); XmlDocument xmldoc11 = new XmlDocument(); string sTable9 = "<tbody>"; xmldoc11.LoadXml("<XML>" + jobInfo2.get_name_leave_request(Session["Email"].ToString(), Session["P@ss"].ToString(), Session["VendorID"].ToString(), "", "", Session["ClientID"].ToString()).InnerXml + "</XML>"); XmlNodeList Response9 = xmldoc11.SelectNodes("XML/RESPONSE/NAME"); sTable9 = ""; int CountRows9 = 1; int intCount9 = 0; for (intCount9 = 0; intCount9 < Response9.Count; intCount9++) { DateTime requestdate = DateTime.Parse(Response9[intCount9].SelectSingleNode("REQUESTED_DATE").InnerText); if (isMoreThanToday(DateTime.Today.Date, requestdate)) { string original = Response9[intCount9].SelectSingleNode("REQUESTED_REASON").InnerText; //first option string test = original.Substring(0, 4); //string reason = Response9[intCount9].SelectSingleNode("REQUESTED_REASON").InnerText; //string subreson = reason.Substring(reason.Length -5); //0,10 sTable9 = sTable9 + "<tr>"; sTable9 = sTable9 + "<td>" + func.FixString(Response9[intCount9].SelectSingleNode("FIRST_NAME").InnerText + " " + Response9[intCount9].SelectSingleNode("LAST_NAME").InnerText) + "</td>"; sTable9 = sTable9 + "<td>" + DateTime.Parse(Response9[intCount9].SelectSingleNode("REQUESTED_DATE").InnerText).ToString("dd MMM, yyyy") + " </td> "; sTable9 = sTable9 + "<td><a href = '#' data-toggle='tooltip' data-placement='top' name='abc' title='" + original + "'>" + test + "..." + " </a></td>"; // sTable9 = sTable9 + "<td>" + func.FixString(Response9[intCount9].SelectSingleNode("REQUESTED_REASON").InnerText) + " </td> "; sTable9 = sTable9 + "<td><a href='#' class='btn btn-primary btn-xs' data-toggle='tooltip' data-placement='top' name='abc' title='" + func.FixString(Response9[intCount9].SelectSingleNode("REQUESTED_COMMENTS").InnerText) + "'><i class='fa fa-info-circle'></i></a> </td> "; string status = Response9[intCount9].SelectSingleNode("ACTION").InnerText; if (status == "2") { sTable9 = sTable9 + "<td> Not approved</td>"; // sTable9 = sTable9 + "<td>Absence Request Not approved</td>"; } if (status == "1") { sTable9 = sTable9 + "<td> Approved</td>"; // sTable9 = sTable9 + "<td>Absence Request Not approved</td>"; } if (status == "0") { sTable9 = sTable9 + "<td> Rejected</td>"; // sTable9 = sTable9 + "<td>Absence Request Not approved</td>"; } sTable9 = sTable9 + "</tr>"; CountRows9++; } } if (Response9.Count == 0) { sTable9 = sTable9 + "<td colspan=4>" + "There are no Absence Requests at this time." + "</td> "; sTable9 = sTable9 + "</tr>"; } sTable9 = sTable9 + "</tbody>"; jobInfo2.Dispose(); lblrequestleave.Text = sTable9; if (Request.QueryString["action"] != null) { //timesheet popup modal action text lblAction.Text = "Timesheet Action (Approve)"; if (Request.QueryString["mess"] != null) { int DollarTextposition = Request.QueryString["mess"].ToString().Replace("(", "<br>(").IndexOf("for $"); //Request.QueryString["mess"].ToString().Replace("(", "<br>(").Substring(0, DollarTextposition) + " for " + Request.QueryString["time"].ToString().Replace("(", "<br>(") + " hours"; //lblActionTimeSheet.Text = "Are you sure you want to " + Request.QueryString["action"] + " the timesheet for <br>" + Request.QueryString["mess"].ToString().Replace("(", "<br>("); lblActionTimeSheet.Text = "Are you sure you want to " + Request.QueryString["action"] + " the timesheet for <br>" + Request.QueryString["mess"].ToString().Replace("(", " <br> ").Substring(0, DollarTextposition) + " for " + Request.QueryString["time"].ToString().Replace("(", " < br > (") + " hours"; } } if (Request.QueryString["action2"] != null) { lblaction2.Text = " Timesheet Action (Reject)"; int DollarTextposition2 = Request.QueryString["mess"].ToString().Replace("(", "<br>(").IndexOf("for $"); //Request.QueryString["mess"].ToString().Replace("(", "<br>(").Substring(0, DollarTextposition) + " for " + Request.QueryString["time"].ToString().Replace("(", "<br>(") + " hours"; //lblActionTimeSheet.Text = "Are you sure you want to " + Request.QueryString["action"] + " the timesheet for <br>" + Request.QueryString["mess"].ToString().Replace("(", "<br>("); lblActionTimeSheet2.Text = "Are you sure you want to " + Request.QueryString["action2"] + " the timesheet for <br>" + Request.QueryString["mess"].ToString().Replace("(", " <br> ").Substring(0, DollarTextposition2) + " for " + Request.QueryString["time"].ToString().Replace("(", " < br > (") + " hours"; //lblaction2.Text = "Timesheet Action"; //lblActionTimeSheet2.Text = "Are you sure you want to " + Request.QueryString["action2"] + " this timesheet<br>" + Request.QueryString["mess"].ToString().Replace("(", "<br>("); } //show timesheets needed to be approved try { if (conn.State == System.Data.ConnectionState.Closed) { conn.Open(); //getJobs string strGetTimeSheettobeApproved = " select timesheet_status_id, timesheet_id_from, timesheet_status, weeknum, employee_id, first_name, last_name, pay_rate,job_id,JobManager_ID, " + " (select top 1 CONCAT(month, '-', day, '-', year) from ovms_timesheet where employee_id = employee_id and DatePart(week, dateadd(d,-1,CONCAT(month, '-', day, '-', year))) = weeknum) as date_from, " + " (select sum(a.hours) as hours_total from ovms_timesheet a, ovms_timesheet_details b where a.employee_id = employee_id and a.timesheet_id = b.timesheet_id and a.active = 1 and b.active = 1 and b.timesheet_status_id = 3 and DatePart(week, dateadd(d, -1, CONCAT(a.month, '-', a.day, '-', a.year))) = weeknum) as hours_reported, " + " (select top 1 dateadd(d,6,CONCAT(month, '-', day, '-', year)) from ovms_timesheet where employee_id = employee_id and DatePart(week, dateadd(d,-1,CONCAT(month, '-', day, '-', year))) = weeknum) as date_to " + " from (select distinct ts.timesheet_status_id, " + " ts.timesheet_status, e.job_id, " + " (select user_id from ovms_jobs where job_id = e.job_id) as JobManager_ID, " + " DatePart(week, dateadd(d,-1,CONCAT(month, '-', day, '-', year))) as weeknum, " + " (select top 1 a.timesheet_id from ovms_timesheet a, ovms_timesheet_details b where a.timesheet_id = b.timesheet_id and a.employee_id =e.employee_id and a.active = 1 and b.active = 1 and b.timesheet_status_id=3) as timesheet_id_from, " + " e.employee_id, " + " dbo.CamelCase(ed.first_name) as first_name, " + " dbo.CamelCase(ed.last_name) as last_name, " + " ed.pay_rate " + " from ovms_timesheet_status as ts " + " join ovms_timesheet_details as td " + " on ts.timesheet_status_id = td.timesheet_status_id " + " join ovms_timesheet as t " + " on td.timesheet_id = t.timesheet_id " + " join ovms_employees as e " + " on t.employee_id = e.employee_id " + " join ovms_employee_details as ed " + " on e.employee_id = ed.employee_id " + " where ts.timesheet_status_id=3 " + " and e.client_id = " + Session["ClientID"].ToString() + " " + " and e.active = 1) as times " + " where timesheet_status_id=3 " + " and JobManager_ID= " + Session["UserID"].ToString() + " order by first_name asc"; SqlCommand cmdGetTimeSheets = new SqlCommand(strGetTimeSheettobeApproved, conn); SqlDataReader readerGetTimeSheets = cmdGetTimeSheets.ExecuteReader(); sTable = sTable + "<tbody>"; if (readerGetTimeSheets.HasRows == true) { while (readerGetTimeSheets.Read()) { string hours = readerGetTimeSheets["HOURS_REPORTED"].ToString(); string chk = "1"; string chk2 = "1"; //DateTime.Parse(readerGetTimeSheets["DATE+_FROM"].ToString()).ToString("dd MMM, yyyy") + string sAction = readerGetTimeSheets["timesheet_status"].ToString(); sTable = sTable + "<tr>"; sTable = sTable + "<td>" + func.FixString(readerGetTimeSheets["FIRST_NAME"].ToString()) + " " + func.FixString(readerGetTimeSheets["LAST_NAME"].ToString()) + "<p>(" + DateTime.Parse(readerGetTimeSheets["DATE_FROM"].ToString()).ToString("dd MMM, yyyy") + " - " + DateTime.Parse(readerGetTimeSheets["DATE_TO"].ToString()).ToString("dd MMM, yyyy") + ")</p></td> "; //sTable = sTable + "<td>" + string.Format("{0:c0}", Convert.ToDouble(readerGetTimeSheets["PAY_RATE"].ToString()) * Convert.ToDouble(readerGetTimeSheets["HOURS_REPORTED"].ToString())) + " </td> "; sTable = sTable + "<td>" + readerGetTimeSheets["HOURS_REPORTED"].ToString() + " </td> "; //sTable = sTable + "<td class='text-right width-100'><a href='C_TimeSheet_View.aspx?topen=Y&p=VT&TID=123&action=Approve&fromD=1&FromM=1&FromY=1' class='btn btn-success btn-xs' data-toggle='tooltip' data-placement='top' name='abc' title='Approve TimeSheet'><i class='fa fa-check'></i></a> <a href='C_TimeSheet_View.aspx?topen=Y&p=VT&TID=1&action=Reject&fromD=1&FromM=1&FromY=1' class='btn btn-danger btn-xs' data-toggle='tooltip' data-placement='top' name='abc' title='Reject TimeSheet'><i class='fa fa-times'></i></a></td>"; sTable = sTable + "<td class='text-right width-100'><a href='C_TimeSheet_View.aspx?topen=Y&p=VT&TID=" + readerGetTimeSheets["employee_id"].ToString() + "' class='btn btn-warning btn-xs' data-toggle='tooltip' data-placement='top' name='abc' title='View Details'><i class='fa fa-table'></i></a> <a href='Client.aspx?TID=" + readerGetTimeSheets["employee_id"].ToString() + "&chk=" + chk + "&time=" + hours + "&action=Approve&fromD=" + Convert.ToDateTime(readerGetTimeSheets["date_from"].ToString()).Day.ToString() + "&FromM=" + Convert.ToDateTime(readerGetTimeSheets["date_from"].ToString()).Month.ToString() + "&FromY=" + Convert.ToDateTime(readerGetTimeSheets["date_from"].ToString()).Year.ToString() + "&Mess=" + Server.UrlEncode(func.FixString(readerGetTimeSheets["FIRST_NAME"].ToString()) + " " + func.FixString(readerGetTimeSheets["LAST_NAME"].ToString())) + " (" + DateTime.Parse(readerGetTimeSheets["DATE_FROM"].ToString()).ToString("dd MMM, yyyy") + " - " + DateTime.Parse(readerGetTimeSheets["DATE_TO"].ToString()).ToString("dd MMM, yyyy") + ") for " + string.Format("{0:c0}", Convert.ToDouble(readerGetTimeSheets["PAY_RATE"].ToString()) * Convert.ToDouble(readerGetTimeSheets["HOURS_REPORTED"].ToString())) + "' class='btn btn-success btn-xs' data-toggle='tooltip' data-placement='top' name='abc' title='Approve Timesheet'><i class='fa fa-check'></i></a> <a href='Client.aspx?TID=" + readerGetTimeSheets["employee_id"].ToString() + "&chk2=" + chk2 + "&time=" + hours + "&action2=reject&fromD=" + Convert.ToDateTime(readerGetTimeSheets["date_from"].ToString()).Day.ToString() + "&FromM=" + Convert.ToDateTime(readerGetTimeSheets["date_from"].ToString()).Month.ToString() + "&FromY=" + Convert.ToDateTime(readerGetTimeSheets["date_from"].ToString()).Year.ToString() + "&Mess=" + Server.UrlEncode(func.FixString(readerGetTimeSheets["FIRST_NAME"].ToString()) + " " + func.FixString(readerGetTimeSheets["LAST_NAME"].ToString())) + "(" + DateTime.Parse(readerGetTimeSheets["DATE_FROM"].ToString()).ToString("dd MMM, yyyy") + " - " + DateTime.Parse(readerGetTimeSheets["DATE_TO"].ToString()).ToString("dd MMM, yyyy") + ") for " + string.Format("{0:c0}", Convert.ToDouble(readerGetTimeSheets["PAY_RATE"].ToString()) * Convert.ToDouble(readerGetTimeSheets["HOURS_REPORTED"].ToString())) + "' class='btn btn-danger btn-xs' data-toggle='tooltip' data-placement='top' name='abc' title='Reject Timesheet'><i class='fa fa-times'></i></a> </i></a></td>"; //sTable = sTable + "<td class='text-right width-100'><a href='C_TimeSheet_View.aspx?topen=Y&p=VT&TID=" + readerGetTimeSheets["employee_id"].ToString() + "' class='btn btn-warning btn-xs' data-toggle='tooltip' data-placement='top' name='abc' title='View Details'><i class='fa fa-table'></i></a> <a href='Client.aspx?TID=" + readerGetTimeSheets["employee_id"].ToString() + "&action=Approve&fromD=" + Convert.ToDateTime(readerGetTimeSheets["date_from"].ToString()).Day.ToString() + "&FromM=" + Convert.ToDateTime(readerGetTimeSheets["date_from"].ToString()).Month.ToString() + "&FromY=" + Convert.ToDateTime(readerGetTimeSheets["date_from"].ToString()).Year.ToString() + "&Mess=" + Server.UrlEncode(func.FixString(readerGetTimeSheets["FIRST_NAME"].ToString()) + " " + func.FixString(readerGetTimeSheets["LAST_NAME"].ToString())) + "(" + DateTime.Parse(readerGetTimeSheets["DATE_FROM"].ToString()).ToString("dd MMM, yyyy") + " - " + DateTime.Parse(readerGetTimeSheets["DATE_TO"].ToString()).ToString("dd MMM, yyyy") + ") for " + string.Format("{0:c0}", Convert.ToDouble(readerGetTimeSheets["PAY_RATE"].ToString()) * Convert.ToDouble(readerGetTimeSheets["HOURS_REPORTED"].ToString())) + "' class='btn btn-success btn-xs' data-toggle='tooltip' data-placement='top' name='abc' title='Approve Timesheet'><i class='fa fa-check'></i></a> <a href='Client.aspx?TID=" + readerGetTimeSheets["employee_id"].ToString() + "&action=Approve&fromD=" + Convert.ToDateTime(readerGetTimeSheets["date_from"].ToString()).Day.ToString() + "&FromM=" + Convert.ToDateTime(readerGetTimeSheets["date_from"].ToString()).Month.ToString() + "&FromY=" + Convert.ToDateTime(readerGetTimeSheets["date_from"].ToString()).Year.ToString() + "' class='btn btn-danger btn-xs' data-toggle='tooltip' data-placement='top' name='abc' title='Reject TimeSheet'><i class='fa fa-times'></i></a></td>"; //sTable = sTable = "<td>12</td>"; //C_TimeSheet_View.aspx?topen=Y&p=VT&TID=1 sTable = sTable + "</tr>"; //string a = ""; //} } // lblJobs.Text = reader["num_of_jobs"].ToString(); //lblVendors.Text = reader["num_of_jobs"].ToString(); } else { sTable = sTable + "<tr>"; sTable = sTable + "<td colspan=3>No Timesheets to be approved</td>"; sTable = sTable + "</tr>"; } sTable = sTable + "</tbody>"; readerGetTimeSheets.Close(); cmdGetTimeSheets.Dispose(); lblTableData.Text = sTable; } } catch (Exception ex) { // } finally { if (conn.State == System.Data.ConnectionState.Open) { conn.Close(); } } //for (int iResponse = 0; iResponse < Response.Count; iResponse++) //{ //sstring.Format("{0:c0}", (8 * Convert.ToDouble(PayRate) * Convert.ToDouble(ContractLength))); //sTable = sTable + "<tr>"; //sTable = sTable + "<td>" + func.FixString(Response[iResponse].SelectSingleNode("FIRST_NAME").InnerText + " " + Response[iResponse].SelectSingleNode("LAST_NAME").InnerText) + "</td> "; //sTable = sTable + "<td>" + string.Format("{0:c0}",Convert.ToDouble(Response[iResponse].SelectSingleNode("PAY_RATE").InnerText) * Convert.ToDouble(Response[iResponse].SelectSingleNode("HOURS").InnerText))+ " </td> "; //sTable = sTable + "<td><a href='approve_timesheet.aspx?wopen=Y&p=VW&empid=" + Response[iResponse].SelectSingleNode("EMPLOYEE_ID").InnerText + "'class='btn btn-success btn-xs' data-toggle='tooltip' data-placement='top' name='abc' title='Approve'><i class='fa fa-check'></i></a> <a href='show_timesheet.aspx?wopen=Y&p=VW&empid=" + Response[iResponse].SelectSingleNode("EMPLOYEE_ID").InnerText + "' class='btn btn-default btn-xs' data-toggle='tooltip' data-placement='top' name='abc' title='More details'><i class='fa fa-pencil'></i></a> <a href='decline_timesheet.aspx?wopen=Y&p=VW&empid=" + Response[iResponse].SelectSingleNode("EMPLOYEE_ID").InnerText + "' class='btn btn-danger btn-xs' data-toggle='tooltip' data-placement='top' name='abc' title='Reject'><i class='fa fa-times'></i></a></td>"; //sTable = sTable + "</tr>"; //string a = ""; //} //sTable = sTable + "</tbody>"; //getWorkers.Dispose(); //lblTableData.Text = sTable; //} //table end if (Session["Email"] == null) { //logout Session.Abandon(); Response.Redirect("Login.aspx?m=Your+session+has+timed+out"); Response.End(); } conn = new SqlConnection(WebConfigurationManager.ConnectionStrings["dbconn"].ConnectionString); //vendor contribution VendorContribution(); //get recently added by manager //recently added jobs API API.Service web = new API.Service(); // XmlDocument _xmlWorkers = new XmlDocument(); //Create XML Stuff XmlDocument _xmlDoc = new XmlDocument(); XmlNodeList nodeList; string _Error = ""; int intCount = 1; //Load XML Element into document _xmlDoc.LoadXml("<XML>" + web.get_Recent_jobs(Session["Email"].ToString(), Session["P@ss"].ToString(), Session["UserTypeID"].ToString(), Session["UserID"].ToString(), "").InnerXml + "</XML>"); //loop through nodeList = _xmlDoc.SelectNodes("XML/RESPONSE/JOB_ID"); string strGOTO = ""; //declare variables string strjob = ""; intCount = nodeList.Count; try { //_Error = nodeList[0].SelectSingleNode("JOB_ALIAS").InnerText; //_Error = nodeList[0].ChildNodes[0].SelectSingleNode("JOB_ALIAS").InnerText; _Error = nodeList[0].SelectSingleNode("JOB_ALIAS").InnerText; } catch (Exception ex) { _Error = "error"; } if (_Error == "error") { strjob = strjob + @"<li class=""list-group-item"">" + @"<div id=""lbl1"" runat=""server"">" + @"No jobs have been added " + @"</div>" + @"</li>"; } else { int i = 0; //loop through nodes foreach (XmlNode book in nodeList) { //job id show jobs strjob = strjob + @"<li class=""list-group-item"">" + @"<div id=""lbl1"" runat=""server"">" + @" <span class='label label-default'>"+ nodeList[i].SelectSingleNode("JOB_ALIAS").InnerText + "</span> <a href='Client_Job_Details.aspx?jopen=Y&p=JV&jobID=" + nodeList[i].SelectSingleNode("JOB_ALIAS").InnerText + "'><b>" + func.FixString(nodeList[i].SelectSingleNode("JOB_TITLE").InnerText) + "</b><br>" + @" "+ nodeList[i].SelectSingleNode("NO_OF_OPENINGS").InnerText + " position(s) | " + func.FixString(nodeList[i].SelectSingleNode("LOCATION").InnerText) + " - " + nodeList[i].SelectSingleNode("LENGTH_OF_DAYS").InnerText + " day(s) </a>" + @"</div>" + @"</li>"; if (i == 0) { strGOTO = @"<li class=""list-group-item text-right"">" + @"<a class=""btn btn-sm btn-primary"" href=""Add_jobs.aspx?jopen=Y&p=JA"">Add a Job<i class=""fa fa-fw fa-arrow-right""></i></a>" + @"</li>"; } //increment i = i + 1; } } lblshowrecentlyadded.Text = strjob + strGOTO; //get top vendor API.Service gettopvendor = new API.Service(); //get_all_vendors_for_a_client XmlDocument XMLDoc = new XmlDocument(); XMLDoc.LoadXml("<XML>" + gettopvendor.get_all_vendors_for_a_client(Session["ClientID"].ToString(), Session["Email"].ToString(), Session["P@ss"].ToString()).InnerXml + "</XML>"); XmlNodeList xResponse = XMLDoc.SelectNodes("XML/RESPONSE/VENDORS"); string _sTopVendorName = ""; for (int iResponse = 0; iResponse < xResponse.Count; iResponse++) { if (iResponse == 0) { _sTopVendorName = xResponse[iResponse].SelectSingleNode("VENDOR_NAME").InnerText.ToUpper(); break; } iResponse = iResponse + 1; } lblTopVendorName.Text = _sTopVendorName; try { if (conn.State == System.Data.ConnectionState.Closed) { conn.Open(); //getJobs string strSQLGetJobs = "select count(*) as num_of_jobs from ovms_jobs where client_ID = " + Session["ClientID"].ToString() + " and active = 1 "; SqlCommand cmdGetJobs = new SqlCommand(strSQLGetJobs, conn); SqlDataReader reader = cmdGetJobs.ExecuteReader(); while (reader.Read()) { lblJobs.Text = reader["num_of_jobs"].ToString(); //lblVendors.Text = reader["num_of_jobs"].ToString(); } reader.Close(); cmdGetJobs.Dispose(); //getVendors string strSQLGetVendors = "select count(*) as NumVendors from ovms_users where utype_id = 2 and client_id =" + Session["ClientID"].ToString() + " and active = 1 "; SqlCommand cmdGetVendors = new SqlCommand(strSQLGetVendors, conn); SqlDataReader readerVendors = cmdGetVendors.ExecuteReader(); while (readerVendors.Read()) { lblVendors.Text = readerVendors["NumVendors"].ToString(); //lblVendors.Text = reader["num_of_jobs"].ToString(); } readerVendors.Close(); cmdGetVendors.Dispose(); } } catch (Exception ex) { // } finally { if (conn.State == System.Data.ConnectionState.Open) { conn.Close(); } } }
protected void Page_Load(object sender, EventArgs e) { if (Session["Email"] == null) { //logout Session.Abandon(); Response.Redirect("Login.aspx?m=Your+session+has+timed+out"); Response.End(); } if (!Page.IsPostBack) { int jobID = 0; if (Request.QueryString["jobID"] != "") { jobID = Int32.Parse(Request.QueryString["jobID"].Substring(Request.QueryString["jobID"].Length - 5)); } API.Service jobDetails = new API.Service(); XmlDocument _xjobDetails = new XmlDocument(); _xjobDetails.LoadXml("<XML>" + jobDetails.get_Jobs(Convert.ToString(jobID), Session["Email"].ToString(), Session["P@ss"].ToString(), Session["VendorID"].ToString(), Session["UserID"].ToString(), Session["ClientID"].ToString()).InnerXml + "</XML>"); // _xjobDetails.LoadXml("<XML>" + jobDetails.get_Jobs("2", "*****@*****.**", "ferivan").InnerXml + "</XML>"); string _Error = ""; try { _Error = _xjobDetails.SelectSingleNode("XML/RESPONSE/ERROR").InnerText; //_xUserInfo.SelectNodes("XML/RESPONSE/JOB_NO") } catch (Exception ex) { _Error = ""; } XmlNodeList Response2 = _xjobDetails.SelectNodes("XML/RESPONSE/JOBS"); //int CountRows = 1; string _Job_Description = ""; string _Job_Title = ""; string _No_Of_Opennings = ""; string _DepartmentName = ""; string _ClientName = ""; string _Job_Position_Type = ""; string _Job_Location = ""; string _Hours_Per_Day = ""; string _Hiring_Manager = ""; string _Job_Currency = ""; string _Job_TimeZone = ""; string _Contract_Start_Date = ""; string _Contract_End_Date = ""; string _Max_submittion = ""; string _ReasonForOpen = ""; string _Urgent = ""; string _PayRate = ""; string _comments = ""; for (int intCount = 0; intCount < Response2.Count; intCount++) { _Job_Description = Response2[intCount].SelectSingleNode("JOB_DESC").InnerText; _Job_Title = Server.HtmlDecode(Response2[intCount].SelectSingleNode("JOB_TITLE").InnerText); _No_Of_Opennings = Response2[intCount].SelectSingleNode("NO_OF_OPENINGS").InnerText; _DepartmentName = Response2[intCount].SelectSingleNode("DEPARTMENT_NAME").InnerText; _ClientName = Response2[intCount].SelectSingleNode("CLIENT_NAME").InnerText; _Job_Position_Type = Response2[intCount].SelectSingleNode("JOB_POSITION_TYPE").InnerText; _Contract_Start_Date = DateTime.Parse(Response2[intCount].SelectSingleNode("CONTRACT_START_DATE").InnerText).ToString("MMMM dd, yyyy"); _Contract_End_Date = DateTime.Parse(Response2[intCount].SelectSingleNode("CONTRACT_END_DATE").InnerText).ToString("MMMM dd, yyyy"); _Job_Location = Response2[intCount].SelectSingleNode("JOB_LOCATION").InnerText; _Hours_Per_Day = Response2[intCount].SelectSingleNode("HOURS_PER_DAY").InnerText; _Hiring_Manager = Response2[intCount].SelectSingleNode("HIRING_MANAGER_NAME").InnerText; _Job_Currency = Response2[intCount].SelectSingleNode("JOB_CURRENCY").InnerText; //_Contract_Start_Date = Response2[intCount].SelectSingleNode("CONTRACT_START_DATE").InnerText; //_Contract_End_Date = Response2[intCount].SelectSingleNode("CONTRACT_END_DATE").InnerText; _Job_TimeZone = Response2[intCount].SelectSingleNode("JOB_TIMEZONE").InnerText; _Max_submittion = Response2[intCount].SelectSingleNode("MAX_SUBMISSION_PER_SUPPLIER").InnerText; _ReasonForOpen = Response2[intCount].SelectSingleNode("REASON_FOR_OPEN").InnerText; _Urgent = Response2[intCount].SelectSingleNode("URGENT").InnerText; _PayRate = Response2[intCount].SelectSingleNode("STD_PAY_RATE").InnerText; _comments = Response2[intCount].SelectSingleNode("COMMENTS").InnerText; } if (_Urgent == "1") { lblUrgent.Text = "(Urgent Request)"; } DateTime dt = Convert.ToDateTime(_Contract_Start_Date); DateTime dtt = Convert.ToDateTime(_Contract_End_Date); lblPostingDate.Text = dt.ToString("dddd, dd MMMM yyyy HH:mm:ss").Replace("00:00:00", ""); lbljobtitle.Text = _Job_Title; lblJobDescription.Text = Server.HtmlDecode(_Job_Description); //lblNumberofPOsitions.Text = _No_Of_Opennings + " position(s) available, please respond by " + dtt.ToString("dddd, dd MMMM yyyy HH:mm:ss").Replace("00:00:00", ""); ; // lblLocation.Text = _Job_Location; //lblnoofopning.Text = _No_Of_Opennings; //lblstartdate.Text = _Job_Posting_Start_Date; //lblenddate.Text = _Job_Posting_End_Date; //lbllocation.Text = _Job_Location; //lblpayrate.Text = _PayRate; if (_comments == "") { lblcomments.Text = "N/A"; } else { lblcomments.Text = _comments; } //API.Service web3 = new API.Service(); API.Service web3 = new API.Service(); XmlDocument dom33 = new XmlDocument(); dom33.LoadXml("<XML>" + web3.get_Jobs(jobID.ToString(), Session["Email"].ToString(), Session["P@ss"].ToString(), Session["VendorID"].ToString(), Session["UserID"].ToString(), Session["ClientID"].ToString()).InnerXml + "</XML>"); XmlNodeList Response8 = dom33.SelectNodes("XML/RESPONSE/JOBS "); lblnoofopning.Text = Response8[iResponse].SelectSingleNode("NO_OF_OPENINGS").InnerText; lblstartdate.Text = DateTime.Parse(Response8[iResponse].SelectSingleNode("CONTRACT_START_DATE").InnerText).ToString("dd MMM, yyyy"); lblenddate.Text = DateTime.Parse(Response8[iResponse].SelectSingleNode("CONTRACT_END_DATE").InnerText).ToString("dd MMM, yyyy"); lblUrgent.Text = Response8[iResponse].SelectSingleNode("URGENT").InnerText; lbljobtitle.Text = Server.HtmlDecode(Response8[iResponse].SelectSingleNode("JOB_TITLE").InnerText); string z = Response8[iResponse].SelectSingleNode("STD_PAY_RATE").InnerText; if (z == "0") { x.Visible = false; y.Visible = true; lbllocation2.Text = Response8[iResponse].SelectSingleNode("JOB_LOCATION").InnerText; lblbill.Text = Response8[iResponse].SelectSingleNode("STD_BILL_RATE").InnerText; lbladdress2.Text = Response8[iResponse].SelectSingleNode("ADDRESS1").InnerText; } else { y.Visible = false; x.Visible = true; lblpay2.Text = Response8[iResponse].SelectSingleNode("STD_PAY_RATE").InnerText; lbllocation.Text = Response8[iResponse].SelectSingleNode("JOB_LOCATION").InnerText; lbladdres.Text = Response8[iResponse].SelectSingleNode("ADDRESS1").InnerText; } if (lblUrgent.Text == "1") { lblUrgent.Text = "(Urgent Request)"; } else { lblUrgent.Text = ""; } API.Service web1 = new API.Service(); XmlDocument dom2 = new XmlDocument(); //string strID = Request.QueryString["ID"]; dom2.LoadXml("<XML>" + web1.get_rating_with_jobid(Session["Email"].ToString(), Session["P@ss"].ToString(), jobID.ToString()).InnerXml + "</XML>"); XmlNodeList Response3 = dom2.SelectNodes("XML/RESPONSE/QUESTIONS_NO "); string que1 = ""; string que2 = ""; string que3 = ""; string que4 = ""; string que5 = ""; string rating1 = ""; string rating2 = ""; string rating3 = ""; string rating4 = ""; string rating5 = ""; string emp_id = ""; string disable = ""; string rejected = ""; string more_info = ""; string cand_approve = ""; string interview_date = ""; string interview_confirm1 = ""; string interview_time = ""; string schedule = ""; que1 = Server.HtmlDecode(Response3[intCount1].SelectSingleNode("QUESTION1").InnerText); if (que1 == "") { divstar.Visible = false; } else { divstar.Visible = true; } que2 = Response3[intCount1].SelectSingleNode("QUESTION2").InnerText; que3 = Response3[intCount1].SelectSingleNode("QUESTION3").InnerText; que4 = Response3[intCount1].SelectSingleNode("QUESTION4").InnerText; que5 = Response3[intCount1].SelectSingleNode("QUESTION5").InnerText; rating1 = Response3[intCount1].SelectSingleNode("RATING1").InnerText; rating2 = Response3[intCount1].SelectSingleNode("RATING2").InnerText; rating3 = Response3[intCount1].SelectSingleNode("RATING3").InnerText; rating4 = Response3[intCount1].SelectSingleNode("RATING4").InnerText; rating5 = Response3[intCount1].SelectSingleNode("RATING5").InnerText; lblque1.Text = que1; labque2.Text = que2; lblque3.Text = que3; lblque4.Text = que4; lblque5.Text = que5; txtRating1.Text = rating1; txtRating2.Text = rating2; txtRating3.Text = rating3; txtRating4.Text = rating4; txtRating5.Text = rating5; string sTable = "<tbody>"; // API.Service web = new API.Service(); API.Service web = new API.Service(); XmlDocument dom1 = new XmlDocument(); //string strID = Request.QueryString["ID"]; dom1.LoadXml("<XML>" + web.get_candiate_for_that_particuler_job(Session["Email"].ToString(), Session["P@ss"].ToString(), jobID.ToString(), Session["VendorID"].ToString()).InnerXml + "</XML>"); XmlNodeList Response1 = dom1.SelectNodes("XML/RESPONSE/EMPLOYEE_NO"); sTable = ""; //string _messageVariable = ""; // _messageVariable = _messageVariable + for (int iResponse2 = 0; iResponse2 < Response1.Count; iResponse2++) { emp_id = Response1[iResponse2].SelectSingleNode("EMPLOYEE_ID").InnerText; if (emp_id.Length > 2) { emp_id = (emp_id.Substring(emp_id.Length - 6)); } API.Service getWorkers = new API.Service(); // API.Service getWorkers = new API.Service(); XmlDocument dom3 = new XmlDocument(); dom1.LoadXml("<XML>" + getWorkers.get_employees(Session["Email"].ToString(), Session["P@ss"].ToString(), emp_id, "", "", "", "", "1", "").InnerXml + "</XML>"); XmlNodeList Response = dom1.SelectNodes("XML/RESPONSE/EMPLOYEE_NAME_ID"); sTable = sTable + "<tr>"; // sTable = sTable + "<td>" + @" <div class=""checkbox checkbox-single margin-none""> <input id=""checkAll"" type=""checkbox"" ></input> <label for=""checkbox2"" > Label </label> </div>" + " </TD>"; // sTable = sTable + "<td>" + _messageVariable + " </TD>"; //sTable = sTable + "<td><a href='preview_employee.aspx?empid=" + Response1[iResponse].SelectSingleNode("EMPLOYEE_ID").InnerText + "&jobId=" + Request.QueryString["jobID"] + "'>Edit</a> </td> "; sTable = sTable + "<td>" + DateTime.Parse(Response1[iResponse2].SelectSingleNode("SUBMIT_DATE").InnerText).ToString("MMMM dd, yyyy") + " </td>"; sTable = sTable + "<td>" + Response1[iResponse2].SelectSingleNode("FIRST_NAME").InnerText + " " + Response1[iResponse2].SelectSingleNode("LAST_NAME").InnerText + " </td> "; sTable = sTable + "<td>" + Response1[iResponse2].SelectSingleNode("EMAIL").InnerText + " </td> "; sTable = sTable + "<td>" + Response1[iResponse2].SelectSingleNode("LOCATION").InnerText + " </td> "; sTable = sTable + "<td>" + Response1[iResponse2].SelectSingleNode("STATUS").InnerText + " </td> "; sTable = sTable + "<td>" + Response1[iResponse2].SelectSingleNode("PAY_RATE").InnerText + " </td> "; sTable = sTable + "<td><a href='" + Response1[iResponse2].SelectSingleNode("RESUME_PATH").InnerText + "'>Resume</a> </td> "; try { disable = Response[iResponse2].SelectSingleNode("INTERVIEW_REQUESTED").InnerText; interview_date = Response[iResponse2].SelectSingleNode("INTERVIEW_DATE").InnerText; interview_time = Response[iResponse2].SelectSingleNode("INTERVIEW_TIME").InnerText; rejected = Response[iResponse2].SelectSingleNode("CANDIDATE_REJECTED").InnerText; more_info = Response[iResponse2].SelectSingleNode("MORE_INFO").InnerText; cand_approve = Response[iResponse2].SelectSingleNode("CANDIDATE_APPROVE").InnerText; interview_confirm1 = Response[iResponse2].SelectSingleNode("INTERVIEW_CONFIRM").InnerText; schedule = (interview_date.ToString().Replace("12:00:00 AM", "")) + (interview_time.ToString()).ToString(); } catch (Exception ex) { disable = ""; interview_date = ""; interview_time = ""; rejected = ""; more_info = ""; cand_approve = ""; interview_confirm1 = ""; schedule = ""; } DateTime cand_start_date = DateTime.Parse(Response[iResponse2].SelectSingleNode("STARTDATE").InnerText); cand_start_date = DateTime.Parse(Response[iResponse2].SelectSingleNode("STARTDATE").InnerText); string cand_start_date1 = (cand_start_date.ToString().Replace("12:00:00 AM", "")); cand_start_date = DateTime.Parse(Response[iResponse2].SelectSingleNode("STARTDATE").InnerText); DateTime contract_start_date = DateTime.Parse(Response[iResponse2].SelectSingleNode("CONTRACT_START_DATE").InnerText); if ((interview_date != "") && (rejected == "0") && (more_info == "") && (cand_approve == "")) { if ((interview_date != "") && (rejected == "0") && (more_info == "") && (cand_approve == "")) { //sTable = sTable + "<td><a href='Client_View_Worker.aspx?wopen=Y&p=VW&approve=" + Response[iResponse].SelectSingleNode("EMPLOYEE_ID").InnerText + "'class='btn btn-success btn-xs' disabled data-toggle='tooltip' data-placement='top' name='abc' title='Interview Requested'><i class='fa fa-check'></i></a> <a href='Client_View_Worker.aspx?wopen=Y&p=VW&more=" + Response[iResponse].SelectSingleNode("EMPLOYEE_ID").InnerText + "' class='btn btn-default btn-xs' disabled data-toggle='tooltip' data-placement='top' name='abc' title='More details'><i class='fa fa-pencil'></i></a> <a href='Client_View_Worker.aspx?wopen=Y&p=VW&Reject=" + Response[iResponse].SelectSingleNode("EMPLOYEE_ID").InnerText + "' class='btn btn-danger btn-xs' disabled data-toggle='tooltip' data-placement='top' name='abc' title='Reject'><i class='fa fa-times'></i></a></td>"; if (interview_confirm1 == "1") { sTable = sTable + "<td>Interview confirm for:<br>" + schedule + "</td>"; } else { sTable = sTable + "<td>Interview Requested for:<br>" + schedule + "</td>"; } } else { sTable = sTable + "<td>Interview Requested</td>"; } } else if ((rejected != "") && (disable == "") && (more_info == "") && (rejected != "0") && (cand_approve == "")) { sTable = sTable + "<td>Rejected</td>"; } else if ((rejected == "0") && (disable == "") && (more_info != "") && (cand_approve == "")) { sTable = sTable + "<td>More Information Needed</td>"; } else if ((rejected == "0") && (disable == "") && (more_info == "") && (cand_approve != "")) { if (contract_start_date <= cand_start_date) { sTable = sTable + "<td>Working</td>"; } else { sTable = sTable + "<td> Candidate set to start on:<br>" + cand_start_date1 + " </td>"; } } else { sTable = sTable + "<td><a href='Client_Job_Details.aspx?wopen=Y&p=VW&done=" + Response1[iResponse].SelectSingleNode("EMPLOYEE_ID").InnerText + "&jobID=" + Request.QueryString["jobID"] + "'class='btn btn-success btn-xs' data-toggle='tooltip' data-placement='top' name='abc' title='Request for an Interview or Approve candidate'><i class='fa fa-calendar fa-fw'></i></a> <a href='Client_Job_Details.aspx?wopen=Y&p=VW&more=" + Response1[iResponse].SelectSingleNode("EMPLOYEE_ID").InnerText + "&jobID=" + Request.QueryString["jobID"] + "' class='btn btn-default btn-xs' data-toggle='tooltip' data-placement='top' name='abc' title='Request more details'><i class='fa fa-pencil'></i></a> <a href='Client_Job_Details.aspx?wopen=Y&p=VW&Reject=" + Response1[iResponse].SelectSingleNode("EMPLOYEE_ID").InnerText + "&jobID=" + Request.QueryString["jobID"] + "' class='btn btn-danger btn-xs' data-toggle='tooltip' data-placement='top' name='abc' title='Reject Candidate'><i class='fa fa-times'></i></a></td>"; } // sTable = sTable + "<td><select name='selDrop'><option name='option1' value='1'>Request For Interview</option><option name='option1' value='2'>Rejected</option><option name='option1' value='3'>More Details</option></select></td>"; sTable = sTable + "</tr>"; } sTable = sTable + "</tbody>"; web.Dispose(); lblTableData.Text = sTable; } }
private void ViewinterviewInTable() { string sTable = "<tbody>"; API.Service jobInfo = new API.Service(); XmlDocument xmldoc = new XmlDocument(); XmlDocument empcomment = new XmlDocument(); API.Service getWorkers = new API.Service(); DateTime datetoday = System.DateTime.Now; //xmldoc.LoadXml("<XML>" + jobInfo.get_JobView("*****@*****.**", "ferivan", "2", "", "", "", "", "", "", "").InnerXml + "</XML>"); xmldoc.LoadXml("<XML>" + jobInfo.get_interview(Session["Email"].ToString(), Session["P@ss"].ToString(), Session["VendorID"].ToString(), Session["ClientID"].ToString(), datetoday.ToString()).InnerXml + "</XML>"); XmlNodeList Response = xmldoc.SelectNodes("XML/RESPONSE/INTERVIEW "); sTable = ""; int CountRows = 1; string _sBackground = ""; for (int intCount = 0; intCount < Response.Count; intCount++) { //if (intCount % 2 >= 1) //{ // //enableordisable = ""; // _sBackground = "bgcolor='#ECF0F1'"; //} //else //{ // // enableordisable = "disabled"; // _sBackground = ""; //} string iDate = Response[intCount].SelectSingleNode("INTERVIEW_DATE").InnerText; if (iDate != string.Empty) { iDate = DateTime.Parse(Response[intCount].SelectSingleNode("INTERVIEW_DATE").InnerText).ToString("dd MMM, yyyy"); } else { iDate = "N/A"; } string check_status = Response[intCount].SelectSingleNode("STATUS").InnerText; if (check_status != "Rejected by Client" && check_status != "Rejected by Vendor") { string empid = Response[intCount].SelectSingleNode("EMP_ID").InnerText; string empid2 = Response[intCount].SelectSingleNode("EMP_ID").InnerText.Substring((empid).Length - 5); string comment = ""; empcomment.LoadXml("<XML>" + getWorkers.get_employees(Session["Email"].ToString(), Session["P@ss"].ToString(), empid2, Session["VendorID"].ToString(), Session["ClientID"].ToString(), "", "", "1", "").InnerXml + "</XML>"); XmlNodeList commentsemp = empcomment.SelectNodes("XML/RESPONSE/EMPLOYEE_NAME_ID"); try { comment = commentsemp[iresponse].SelectSingleNode("INTERVIEW_REQUEST_COMMENT").InnerText; } catch { comment = ""; } if (comment == "" || comment == null) { comment = "No comments given"; } sTable = sTable + "<tr " + _sBackground + ">"; sTable = sTable + "<td>" + CountRows + "</td>"; sTable = sTable + "<td><a href='Client_View_Worker_detail.aspx?&empID=" + Response[intCount].SelectSingleNode("EMP_ID").InnerText + "'>" + Response[intCount].SelectSingleNode("EMP_ID").InnerText + "</td>"; sTable = sTable + "<td>" + Response[intCount].SelectSingleNode("CANDIDATE_NAME").InnerText + "</td> "; sTable = sTable + "<td>" + Server.HtmlDecode(Response[intCount].SelectSingleNode("JOB_TITLE").InnerText) + " </td> "; //sTable = sTable + "<td>" + DateTime.Parse(Response[intCount].SelectSingleNode("INTERVIEW_DATE").InnerText).ToString("dd MMM, yyyy") + " </td> "; sTable = sTable + "<td align='center'>" + iDate + " </td> "; sTable = sTable + "<td align='center'>" + Response[intCount].SelectSingleNode("INTERVIEW_START_TIME").InnerText + "</td>"; sTable = sTable + "<td align='center'>" + Response[intCount].SelectSingleNode("INTERVIEW_END_TIME").InnerText + "</td>"; sTable = sTable + "<td>" + Response[intCount].SelectSingleNode("INTERVIEWER").InnerText + "</td>"; sTable = sTable + "<td>" + comment + "</td>"; sTable = sTable + "</tr>"; CountRows++; } } sTable = sTable + "</tbody>"; jobInfo.Dispose(); lblTableData.Text = sTable; }
protected void Page_Load(object sender, EventArgs e) { if (Session["Email"] == null) { //logout Session.Abandon(); HttpContext.Current.Response.Redirect("Login.aspx?m=You+have+logged+out"); HttpContext.Current.Response.End(); } if (!Page.IsPostBack) { if (Request.QueryString["reply"] != null) { string empid_url2 = Request["empid"]; int empid_url3 = Int32.Parse(Request["empid"].Substring(Request["empid"].Length - 6)); API.Service getWorker = new API.Service(); // API.Service getWorker = new API.Service(); XmlDocument dom3 = new XmlDocument(); dom3.LoadXml("<XML>" + getWorker.get_employees(Session["Email"].ToString(), Session["P@ss"].ToString(), empid_url3.ToString(), Session["VendorID"].ToString(), Session["ClientID"].ToString(), "", "", "1", "").InnerXml + "</XML>"); XmlNodeList Response4 = dom3.SelectNodes("XML/RESPONSE/EMPLOYEE_NAME_ID"); lblname.Text = func.FixString(Response4[iResponse].SelectSingleNode("FIRSTNAME").InnerText) + " " + func.FixString(Response4[iResponse].SelectSingleNode("LASTNAME").InnerText); jobid_feed = Response4[iResponse].SelectSingleNode("JOB_ID").InnerText; } } string empid_url = Request["empid"]; int empid_url1 = Int32.Parse(Request["empid"].Substring(Request["empid"].Length - 6)); API.Service getWorkers = new API.Service(); XmlDocument dom1 = new XmlDocument(); dom1.LoadXml("<XML>" + getWorkers.get_employees(Session["Email"].ToString(), Session["P@ss"].ToString(), empid_url1.ToString(), "", Session["ClientID"].ToString(), "", "", "1", "").InnerXml + "</XML>"); XmlNodeList Response = dom1.SelectNodes("XML/RESPONSE/EMPLOYEE_NAME_ID"); // lblprofile.Text = Response[iResponse].SelectSingleNode("PROFILE_PICTURE_PATH").InnerText; lblfirst.Text = func.FixString(Response[iResponse].SelectSingleNode("FIRSTNAME").InnerText); lblmiddle.Text = func.FixString(Response[iResponse].SelectSingleNode("MIDDLE_NAME").InnerText); lbllast.Text = func.FixString(Response[iResponse].SelectSingleNode("LASTNAME").InnerText); lblemail.Text = Response[iResponse].SelectSingleNode("EMAIL").InnerText; lblphone.Text = Response[iResponse].SelectSingleNode("PHONE").InnerText; lbldob.Text = Response[iResponse].SelectSingleNode("DATE_OF_BIRTH").InnerText; lblsuite.Text = Response[iResponse].SelectSingleNode("SUITE_NO").InnerText; lbladdress.Text = func.FixString(Response[iResponse].SelectSingleNode("ADDRESS1").InnerText); lblcity.Text = func.FixString(Response[iResponse].SelectSingleNode("LOCATION").InnerText); lblprovince.Text = func.FixString(Response[iResponse].SelectSingleNode("PROVINCE").InnerText); // lblcountry.Text = func.FixString(Response[iResponse].SelectSingleNode("COUNTRY").InnerText); lblpostal.Text = Response[iResponse].SelectSingleNode("POSTAL").InnerText; lblcomment.Text = func.FixString(Response[iResponse].SelectSingleNode("COMMENTS").InnerText); lblavailable.Text = Response[iResponse].SelectSingleNode("AVAILABILITY_FOR_INTERVIEW").InnerText; lblskype.Text = Response[iResponse].SelectSingleNode("SKYPE").InnerText; lbllicence.Text = Response[iResponse].SelectSingleNode("LICENCE_NO").InnerText; lbllastsin.Text = Response[iResponse].SelectSingleNode("LAST_4_DIGITS_OF_SSN_SIN").InnerText; lblpay.Text = Response[iResponse].SelectSingleNode("PAY_RATE").InnerText; lbljob.Text = func.FixString(Response[iResponse].SelectSingleNode("JOB_TITLE").InnerText + "-" + Response[iResponse].SelectSingleNode("JOB_ID").InnerText); string jobid2 = Response[iResponse].SelectSingleNode("JOB_ID").InnerText; Label1.Text = Response[iResponse].SelectSingleNode("PAY_RATE").InnerText; API.Service web1 = new API.Service(); // API.Service web1 = new API.Service(); XmlDocument dom2 = new XmlDocument(); //string strID = Request.QueryString["ID"]; dom2.LoadXml("<XML>" + web1.get_Jobs(jobid2, Session["Email"].ToString(), Session["P@ss"].ToString(), Session["VendorID"].ToString(), Session["UserID"].ToString(), Session["ClientID"].ToString()).InnerXml + "</XML>"); XmlNodeList Response8 = dom2.SelectNodes("XML/RESPONSE/JOBS "); lblnoofopning.Text = Response8[iResponse].SelectSingleNode("NO_OF_OPENINGS").InnerText; lblstartdate.Text = DateTime.Parse(Response8[iResponse].SelectSingleNode("CONTRACT_START_DATE").InnerText).ToString("dd MMM, yyyy"); lblenddate.Text = DateTime.Parse(Response8[iResponse].SelectSingleNode("CONTRACT_END_DATE").InnerText).ToString("dd MMM, yyyy"); lblUrgent.Text = Response8[iResponse].SelectSingleNode("URGENT").InnerText; lbljobtitle.Text = Response8[iResponse].SelectSingleNode("JOB_TITLE").InnerText; string z = Response8[iResponse].SelectSingleNode("STD_PAY_RATE").InnerText; if (z == "0") { x.Visible = false; y.Visible = true; lbllocation2.Text = Response8[iResponse].SelectSingleNode("JOB_LOCATION").InnerText; lblbill.Text = Response8[iResponse].SelectSingleNode("STD_BILL_RATE").InnerText; } else { y.Visible = false; x.Visible = true; lblpay.Text = Response8[iResponse].SelectSingleNode("STD_PAY_RATE").InnerText; lbllocation.Text = Response8[iResponse].SelectSingleNode("JOB_LOCATION").InnerText; } if (lblUrgent.Text == "1") { lblUrgent.Text = "(Urgent Request)"; } else { lblUrgent.Text = ""; } dom2.LoadXml("<XML>" + web1.get_jobrating(Session["Email"].ToString(), Session["P@ss"].ToString(), jobid2).InnerXml + "</XML>"); XmlNodeList Response3 = dom2.SelectNodes("XML/RESPONSE/QUESTIONS_NO "); string que1 = ""; string que2 = ""; string que3 = ""; string que4 = ""; string que5 = ""; string rating1 = ""; string rating2 = ""; string rating3 = ""; string rating4 = ""; string rating5 = ""; string emprating1 = ""; string emprating2 = ""; string emprating3 = ""; string emprating4 = ""; string emprating5 = ""; try { //que1 = Server.HtmlDecode(Response3[intCount1].SelectSingleNode("QUESTION1").InnerText); que1 = Server.HtmlDecode(Response3[intCount1].SelectSingleNode("QUESTION1").InnerText); que2 = Response3[intCount1].SelectSingleNode("QUESTION2").InnerText; que3 = Response3[intCount1].SelectSingleNode("QUESTION3").InnerText; que4 = Response3[intCount1].SelectSingleNode("QUESTION4").InnerText; que5 = Response3[intCount1].SelectSingleNode("QUESTION5").InnerText; rating1 = Response3[intCount1].SelectSingleNode("RATING1").InnerText; rating2 = Response3[intCount1].SelectSingleNode("RATING2").InnerText; rating3 = Response3[intCount1].SelectSingleNode("RATING3").InnerText; rating4 = Response3[intCount1].SelectSingleNode("RATING4").InnerText; rating5 = Response3[intCount1].SelectSingleNode("RATING5").InnerText; dom2.LoadXml("<XML>" + web1.get_emprating(Session["Email"].ToString(), Session["P@ss"].ToString(), empid_url1.ToString()).InnerXml + "</XML>"); XmlNodeList Response33 = dom2.SelectNodes("XML/RESPONSE/QUESTIONS_NO "); try { //que1 = Server.HtmlDecode(Response3[intCount1].SelectSingleNode("QUESTION1").InnerText); emprating1 = Response33[iResponse].SelectSingleNode("RATING1").InnerText; emprating2 = Response33[iResponse].SelectSingleNode("RATING2").InnerText; emprating3 = Response33[iResponse].SelectSingleNode("RATING3").InnerText; emprating4 = Response33[iResponse].SelectSingleNode("RATING4").InnerText; emprating5 = Response33[iResponse].SelectSingleNode("RATING5").InnerText; } catch (Exception ex) { //nothing //que1 = ""; } } catch (Exception ex) { //nothing //que1 = ""; } if (que1 == "") { divstar.Visible = false; } else { divstar.Visible = true; } lblque1.Text = que1; labque2.Text = que2; lblque3.Text = que3; lblque4.Text = que4; lblque5.Text = que5; txtRating1.Text = rating1; txtRating2.Text = rating2; txtRating3.Text = rating3; txtRating4.Text = rating4; txtRating5.Text = rating5; txtemprat1.Text = emprating1; txtemprat2.Text = emprating2; txtemprat3.Text = emprating3; txtemprat4.Text = emprating4; txtemprat5.Text = emprating5; // dom1.LoadXml("<XML>" + getWorkers.get_resume(Session["Email"].ToString(), Session["P@ss"].ToString(), empid_url1.ToString(), "").InnerXml + "</XML>"); //try //{ // XmlNodeList Response2 = dom1.SelectNodes("XML/RESPONSE/RESUME_ID"); // lblresume.Text = Response2[iResponse].SelectSingleNode("RESUME_PATH").InnerText; //} //catch (Exception ex) //{ // lblresume.Text = ""; //} dom1.LoadXml("<XML>" + getWorkers.get_resume(Session["Email"].ToString(), Session["P@ss"].ToString(), empid_url1.ToString(), "").InnerXml + "</XML>"); try { XmlNodeList Response2 = dom1.SelectNodes("XML/RESPONSE/RESUME_ID"); string resume = Response2[iResponse].SelectSingleNode("RESUME_PATH").InnerText; // string resume = Response1[iResponse2].SelectSingleNode("RESUME_PATH").InnerText; string resuepath = Response2[iResponse].SelectSingleNode("RESUME_PATH").InnerText.Substring(Response2[iResponse].SelectSingleNode("RESUME_PATH").InnerText.IndexOf("Resume\\"), Convert.ToInt32(Response2[iResponse].SelectSingleNode("RESUME_PATH").InnerText.Length) - Convert.ToInt32(Response2[iResponse].SelectSingleNode("RESUME_PATH").InnerText.IndexOf("Resume\\"))).Replace("\\", "//").ToString(); lblresume.Text = "<a href = 'http://www.flentispro.com/" + resuepath.Replace("//", "/") + "'> Resume </a>"; } catch (Exception ex) { lblresume.Text = ""; } API.Service jobInfo2 = new API.Service(); XmlDocument xmldoc11 = new XmlDocument(); string sTable9 = "<tbody>"; xmldoc11.LoadXml("<XML>" + jobInfo2.get_name_leave_request(Session["Email"].ToString(), Session["P@ss"].ToString(), Session["VendorID"].ToString(), empid_url1.ToString(), "", Session["ClientID"].ToString()).InnerXml + "</XML>"); XmlNodeList Response9 = xmldoc11.SelectNodes("XML/RESPONSE/NAME"); sTable9 = ""; int CountRows9 = 1; int intCount9 = 0; for (intCount9 = 0; intCount9 < Response9.Count; intCount9++) { sTable9 = sTable9 + "<tr>"; // sTable9 = sTable9 + "<td>" + func.FixString(Response9[intCount9].SelectSingleNode("FIRST_NAME").InnerText + " " + Response9[intCount9].SelectSingleNode("LAST_NAME").InnerText) + "</td>"; sTable9 = sTable9 + "<td>" + DateTime.Parse(Response9[intCount9].SelectSingleNode("REQUESTED_DATE").InnerText).ToString("dd MMM, yyyy") + " </td> "; sTable9 = sTable9 + "<td>" + func.FixString(Response9[intCount9].SelectSingleNode("REQUESTED_REASON").InnerText) + "</td> "; sTable9 = sTable9 + "<td>" + func.FixString(Response9[intCount9].SelectSingleNode("REQUESTED_COMMENTS").InnerText) + "</td> "; string status = Response9[intCount9].SelectSingleNode("ACTION").InnerText; if (status == "2") { sTable9 = sTable9 + "<td> Not approved</td>"; // sTable9 = sTable9 + "<td>Absence Request Not approved</td>"; } if (status == "1") { sTable9 = sTable9 + "<td> Approved</td>"; // sTable9 = sTable9 + "<td>Absence Request Not approved</td>"; } if (status == "0") { sTable9 = sTable9 + "<td> Rejected</td>"; // sTable9 = sTable9 + "<td>Absence Request Not approved</td>"; } sTable9 = sTable9 + "</tr>"; CountRows9++; } if (Response9.Count == 0) { sTable9 = sTable9 + "<td colspan=4>" + "There are no Absence Requests at this time." + "</td> "; sTable9 = sTable9 + "</tr>"; } sTable9 = sTable9 + "</tbody>"; jobInfo2.Dispose(); lblrequestleave.Text = sTable9; conn = new SqlConnection(WebConfigurationManager.ConnectionStrings["dbconn"].ConnectionString); try { if (conn.State == System.Data.ConnectionState.Closed) { conn.Open(); //start, end and weeks string sqlGetChat = " select feeedback_id, v_comments, v_create_date, c_comments, c_create_date from ovms_candidate_feedback " + " where client_id = " + Session["ClientID"].ToString() + " and vendor_id = " + Session["VendorID"].ToString() + " and emplyee_id = " + empid_url1 + " order by feeedback_id asc"; SqlCommand cmdGetChat = new SqlCommand(sqlGetChat, conn); SqlDataReader rsGetChat = cmdGetChat.ExecuteReader(); //string _svendorList = ""; string sMessages = ""; while (rsGetChat.Read()) { sMessages = sMessages + "<tr>" + " <td width='50%' class='pull-left' style='color:blue'> " + " " + rsGetChat["v_comments"].ToString() + " " + " on" + " " + rsGetChat["v_create_date"].ToString() + " " + " </td>" + " <td class='pull-right'></td>" + " </tr>" + " <tr>" + " <td></td>" + " <td style='color:red'>" + " " + rsGetChat["c_comments"].ToString() + " " + " " + rsGetChat["c_create_date"].ToString() + ""; if ((rsGetChat["c_comments"].ToString() == "") || (rsGetChat["c_comments"] == null)) { //string empid_url = Request["empid"]; //int empid_url1 = Int32.Parse(Request["empid"].Substring(Request["empid"].Length - 6)); // Response.Redirect("Client_View_Worker_detail.aspx?wopen=Y&p=VW&empid=" + empid_url + "&reply=y"); sMessages = sMessages + "<a class='btn btn-success' href='Client_View_Worker_detail.aspx?wopen=Y&p=VW&empid=" + empid_url + "&reply=y'><i class='fa fa-check - circle' ></i> Reply</a>"; } //<asp:Button ID='btnreplyc' ValidationGroup='n' runat='server' OnClick='btnreplyc_Click1' Text='Reply' CssClass='form-control' /> sMessages = sMessages + " </td>" + " </tr>"; } //close rsGetChat.Close(); cmdGetChat.Dispose(); lblMessagesBackForth.Text = sMessages; //rsStartEndWeeks.Close(); //cmdStartEndWeeks.Dispose(); } } catch (Exception ex) { // } finally { if (conn.State == System.Data.ConnectionState.Open) { conn.Close(); } } // ////vendor request // API.Service vendoreq = new API.Service(); //// API.Service jobInfo2 = new API.Service(); // XmlDocument xmldoc5 = new XmlDocument(); //' lblcreply.Visible = false; //// btnreplyc.Visible = true; //xmldoc11.LoadXml("<XML>" + vendoreq.get_v_feedback(Session["Email"].ToString(), Session["P@ss"].ToString(), "", empid_url1.ToString(), "",Session["VendorID"].ToString(), Session["ClientID"].ToString()).InnerXml + "</XML>"); // XmlNodeList Response5 = xmldoc11.SelectNodes("XML/RESPONSE/FEEDBACK"); // 'lblvendorcomments.Text = Response5[iResponse].SelectSingleNode("V_COMMENTS").InnerText; // 'lbldate.Text= DateTime.Parse(Response5[iResponse].SelectSingleNode("V_CREATE_DATE").InnerText).ToString("dd MMM, yyyy"); // 'lblcreply.Text= Response5[iResponse].SelectSingleNode("C_COMMENTS").InnerText; // if (lblcreply.Text!="") // { // lblcreply.Visible = true; // btnreplyc.Visible = false; // lbldatec.Text = " on " + DateTime.Parse(Response5[iResponse].SelectSingleNode("C_CREATE_DATE").InnerText).ToString("dd MMM, yyyy"); // } // vendoreq.Dispose(); }