protected void UpdateSite() { int varFlagSiteExist; int Custid = 0; // To Check Whether Site Exist in Particular Region ,and assign status to field varFlagSiteExist varFlagSiteExist = objSite.Get_By_SiteName(txtSitename.Text.ToString().Trim(), Convert.ToInt32(drpRegion.SelectedValue)); // Declare Local Variable siteid ,hold the Query String value passed from ViewSite.aspx page int siteid = Convert.ToInt32(Request.QueryString[0]); // Get the Instance of Site_mst Class and Assign to Object Variable objSite objSite = objSite.Get_By_id(siteid); // Check ,Instance Exist or Not if ((objSite.Siteid != 0) && (varFlagSiteExist == 0)) { // Assign form fields values via object fields values txtSitename.Text = objSite.Sitename.ToString().Trim(); txtSitedesc.Text = objSite.Description.ToString().Trim(); drpRegion.SelectedValue = Convert.ToString(objSite.Regionid); drpCountry.SelectedValue = Convert.ToString(objSite.Countryid); txtAddress.Text = objSite.Address.ToString().Trim(); txtCity.Text = objSite.City.ToString().Trim(); txtEmailId.Text = objSite.Emailid.ToString().Trim(); txtFaxNo.Text = objSite.Faxno.ToString().Trim(); txtMobileno.Text = objSite.Mobileno.ToString().Trim(); txtPersonName.Text = objSite.Contactpersonname.ToString().Trim(); txtPhoneNo.Text = objSite.Phoneno.ToString().Trim(); txtPostalCode.Text = objSite.Postalcode.ToString().Trim(); txtState.Text = objSite.State.ToString().Trim(); txtWebSiteUrl.Text = objSite.Website.ToString().Trim(); colCustToSite = objCustToSite.Get_All_By_siteid(objSite.Siteid); foreach (CustomerToSiteMapping obj in colCustToSite) { Custid = obj.Custid; } ViewState["CustId"] = Custid; drpCustomer.SelectedValue = Convert.ToString(Custid); if (objSite.Enable == true) { dropEnable.SelectedValue = "1"; } else { dropEnable.SelectedValue = "0"; } } else { // Show Message Site Already Exist lblErrorMsg.Text = Resources.MessageResource.errSiteExist.ToString(); } }
protected void Update() { int Slaid = Convert.ToInt32(Request.QueryString[0]); objSla = objSla.Get_By_id(Slaid); if (objSla.Slaid != 0) { int siteid = objSla.Siteid; objSite = objSite.Get_By_id(siteid); if (objSite.Siteid != 0) { lblSite.Text = objSite.Sitename; } txtSlaName.Text = objSla.Slaname.ToString().Trim(); txtDescription.Text = objSla.Description.ToString().Trim(); objSlaPriority = objSlaPriority.Get_By_id(objSla.Slaid); if (objSlaPriority.Priorityid != 0) { objPriority = objPriority.Get_By_id(objSlaPriority.Priorityid); if (objPriority.Priorityid != 0) { lblPriority.Text = objPriority.Name.ToString().Trim(); drphr.SelectedValue = Convert.ToString(objSlaPriority.Resolutionhours); drpMin.SelectedValue = Convert.ToString(objSlaPriority.Resolutionmin); txtDays.Text = Convert.ToString(objSlaPriority.Resolutiondays); } } } }
protected void BindDropSite() { int userid; userid = objUser.Userid; colUserToSite = ObjUserToSite.Get_All_By_userid(userid); foreach (UserToSiteMapping Obj in colUserToSite) { int siteid; Site_mst objSite1 = new Site_mst(); siteid = Obj.Siteid; objSite1 = objSite.Get_By_id(siteid); if (objSite1.Siteid != 0) { int custid = Convert.ToInt16(drpCustomer.SelectedValue); int flag = objCustToSite.Get_By_Id(custid, objSite1.Siteid); if (flag == 1) { colSite.Add(objSite1); } } } //} //drpSite.DataTextField = "sitename"; //drpSite.DataValueField = "siteid"; //drpSite.DataSource = colSite ; //drpSite.DataBind(); // if (colSite.Count == 0) // { // ListItem item = new ListItem(); // item.Text = "-------------Select-------------"; // item.Value = "0"; // drpSite.Items.Add(item); // } // } //} //protected void BindDropSite() //{ //colSite = objSite.Get_All(); drpSite.DataTextField = "sitename"; drpSite.DataValueField = "siteid"; drpSite.DataSource = colSite; drpSite.DataBind(); //ListItem item = new ListItem(); //item.Text = "-------------Select-------------"; //item.Value = "0"; //drpSite.Items.Add(item); //drpSite.SelectedValue = "0"; }
protected void grdvwSla_RowDataBound(Object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { int siteid = Convert.ToInt16(e.Row.Cells[2].Text); objSite = objSite.Get_By_id(siteid); e.Row.Cells[2].Text = objSite.Sitename.ToString(); } }
protected void grdvwEdit_RowDataBound(Object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { int varSiteid; varSiteid = Convert.ToInt32(drpsite.SelectedValue); objsite = objsite.Get_By_id(varSiteid); e.Row.Cells[3].Text = objsite.Sitename; } }
protected void BindDropSite() { string userName = ""; MembershipUser User = Membership.GetUser(); if (User != null) { userName = User.UserName.ToString(); } if (userName != "") { int userid; objOrganization = objOrganization.Get_Organization(); objUser = objUser.Get_UserLogin_By_UserName(userName, objOrganization.Orgid); if (objUser.Userid != 0) { userid = objUser.Userid; colUserToSite = ObjUserToSite.Get_All_By_userid(userid); foreach (UserToSiteMapping obj in colUserToSite) { int siteid; Site_mst objSite1 = new Site_mst(); siteid = obj.Siteid; objSite1 = objSite1.Get_By_id(siteid); if (objSite1.Siteid != 0) { colSite.Add(objSite1); } } } drpSite.DataTextField = "sitename"; drpSite.DataValueField = "siteid"; drpSite.DataSource = colSite; drpSite.DataBind(); ListItem item = new ListItem(); item.Text = "-------------Select-------------"; item.Value = "0"; drpSite.Items.Add(item); drpSite.SelectedValue = "0"; //drpSite1.DataTextField = "sitename"; //drpSite1.DataValueField = "siteid"; //drpSite1.DataSource = colSite; //drpSite1.DataBind(); //ListItem item1= new ListItem(); //item1.Text = "-------------Select-------------"; //item1.Value = "0"; //drpSite1.Items.Add(item1); //drpSite1.SelectedValue = "0"; } }
protected void BindDropSite() { string userName = ""; MembershipUser User = Membership.GetUser(); if (User != null) { userName = User.UserName.ToString(); } if (userName != "") { int userid; objOrganization = objOrganization.Get_Organization(); objUser = objUser.Get_UserLogin_By_UserName(userName, objOrganization.Orgid); if (objUser.Userid != 0) { userid = objUser.Userid; colUserToSite = ObjUserToSite.Get_All_By_userid(userid); foreach (UserToSiteMapping obj in colUserToSite) { int siteid; Site_mst objSite1 = new Site_mst(); siteid = obj.Siteid; objSite1 = objSite1.Get_By_id(siteid); if (objSite1.Siteid != 0) { int custid = Convert.ToInt16(drpCustomer.SelectedValue); int flag = objCustToSite.Get_By_Id(custid, objSite1.Siteid); if (flag == 1) { colSite.Add(objSite1); } } } } drpSite.DataTextField = "sitename"; drpSite.DataValueField = "siteid"; drpSite.DataSource = colSite; drpSite.DataBind(); if (colSite.Count == 0) { ListItem item = new ListItem(); item.Text = "-------------Select-------------"; item.Value = "0"; drpSite.Items.Add(item); } } }
protected void departmentgrdvw_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow && e.Row.RowState != DataControlRowState.Edit) { int siteid; Label lblsiteid = (Label)e.Row.FindControl("lblsite"); if (lblsiteid != null) { siteid = Convert.ToInt16(lblsiteid.Text); ViewState["siteid"] = lblsiteid.Text; objSite = objSite.Get_By_id(siteid); lblsiteid.Text = objSite.Sitename.ToString(); } } if (e.Row.RowState == (System.Web.UI.WebControls.DataControlRowState.Alternate | System.Web.UI.WebControls.DataControlRowState.Edit)) { DropDownList drpsitename = (DropDownList)e.Row.FindControl("drpsitename"); BLLCollection <Site_mst> col = new BLLCollection <Site_mst>(); col = objSite.Get_All(); drpsitename.DataSource = col; drpsitename.DataTextField = "sitename"; drpsitename.DataValueField = "siteid"; drpsitename.DataBind(); drpsitename.SelectedValue = ViewState["siteid"].ToString(); } if (e.Row.RowState == DataControlRowState.Edit) { DropDownList drpsitename = (DropDownList)e.Row.FindControl("drpsitename"); BLLCollection <Site_mst> col = new BLLCollection <Site_mst>(); col = objSite.Get_All(); drpsitename.DataSource = col; drpsitename.DataTextField = "SiteName"; drpsitename.DataValueField = "siteid"; drpsitename.DataBind(); drpsitename.SelectedValue = ViewState["siteid"].ToString(); } }
protected void grdvwRequest_RowDataBound(Object sender, GridViewRowEventArgs e) { System.Drawing.ColorConverter colConvert = new ColorConverter(); BLLCollection <ColorScheme_mst> colColor = new BLLCollection <ColorScheme_mst>(); if (e.Row.RowType == DataControlRowType.DataRow) { #region Autogenerate Serial number Label lblSerial = (Label)e.Row.FindControl("lblSerial"); lblSerial.Text = i.ToString(); i++; #endregion int TotalTimeSpentonCall; int TotalResolutionTime; int varIncidentid = Convert.ToInt16(((Label)e.Row.FindControl("incidentid")).Text.ToString()); string varCreateDatetime = e.Row.Cells[9].Text; string varStatusOpen = Resources.MessageResource.strStatusOpen.ToString(); string varStatusClose = Resources.MessageResource.strStatusClose.ToString(); string varStatusOnHold = Resources.MessageResource.strStatusOnHold.ToString(); string varStatusResolved = Resources.MessageResource.strStatusResolved.ToString(); #region Bind Data Row at Run time with requesterid to Requester name int requesterid = Convert.ToInt16(e.Row.Cells[3].Text); objUser = objUser.Get_By_id(requesterid); if (objUser.Userid != 0) { e.Row.Cells[3].Text = objUser.Username.ToString(); } else { e.Row.Cells[3].Text = ""; } #endregion #region Bind Datarow at Run Time with Createdbyid to Created by name int createdbyid = Convert.ToInt16(e.Row.Cells[4].Text); objUser = objUser.Get_By_id(createdbyid); if (objUser.Userid != 0) { e.Row.Cells[4].Text = objUser.Username.ToString(); } else { e.Row.Cells[4].Text = ""; } #endregion #region Bind Datarow at Run Time with technicianid to technician name int technicianid = Convert.ToInt16(e.Row.Cells[5].Text); objUser = objUser.Get_By_id(technicianid); if (objUser.Userid != 0) { e.Row.Cells[5].Text = objUser.Username.ToString(); } else { e.Row.Cells[5].Text = ""; } #endregion #region Bind Datarow at run time with Statusid to Status int statusid = Convert.ToInt16(e.Row.Cells[6].Text); objStatus = objStatus.Get_By_id(statusid); if (objStatus.Statusid != 0) { e.Row.Cells[6].Text = objStatus.Statusname.ToString(); } else { e.Row.Cells[6].Text = ""; } #endregion #region Bind Datarow at run time with Priorityid to Priority int priorityid = Convert.ToInt16(e.Row.Cells[7].Text); objPriority = objPriority.Get_By_id(priorityid); if (objPriority.Priorityid != 0) { e.Row.Cells[7].Text = objPriority.Name.ToString(); } else { e.Row.Cells[7].Text = ""; } #endregion #region Bind Datarow at run time with Siteid to Site int siteid = Convert.ToInt16(e.Row.Cells[8].Text); objSite = objSite.Get_By_id(siteid); if (objSite.Siteid != 0) { string custSiteName; int custid = 0; colCustToSite = objCustToSite.Get_All_By_siteid(objSite.Siteid); foreach (CustomerToSiteMapping objCuToSite in colCustToSite) { custid = objCuToSite.Custid; } objCustomer = objCustomer.Get_By_id(custid); e.Row.Cells[8].Text = objCustomer.Customer_name + "/" + objSite.Sitename.ToString(); } else { e.Row.Cells[8].Text = ""; } #endregion #region Apply Color Coding to Open Calls,According to define SLA if (varStatusOpen.ToLower() == objStatus.Statusname.ToString().ToLower()) { Incident_mst obj = new Incident_mst(); obj = obj.Get_By_id(varIncidentid); if (obj.Incidentid != 0) { if (obj.Slaid != 0) { #region Declare local variables,and objects of various classes int percent; ProcessEscalateEmail objPro = new ProcessEscalateEmail(); #endregion #region Get Total Resolution time define for particular SLA and Time Spent on Request TotalResolutionTime = objPro.GetResolutionTimeInMins(obj.Slaid); TotalTimeSpentonCall = objIncident.Get_TimeSpentonRequest(varIncidentid, siteid, varCreateDatetime, DateTime.Now.ToString()); if (TotalTimeSpentonCall < 0) { TotalTimeSpentonCall = 0; } #endregion #region Calculate Percent percent = (TotalTimeSpentonCall * 100) / TotalResolutionTime; #endregion ColorScheme_mst objColor = new ColorScheme_mst(); colColor = objColor.Get_All_By_CallStatus(varStatusOpen); foreach (ColorScheme_mst objCol in colColor) { if (objCol.Percnt_to != 0) { if (percent >= objCol.Percnt && percent <= objCol.Percnt_to) { e.Row.BackColor = (System.Drawing.Color)colConvert.ConvertFromString(objCol.Colorname); } } else { if (percent >= objCol.Percnt) { e.Row.BackColor = (System.Drawing.Color)colConvert.ConvertFromString(objCol.Colorname); } } } } else { ColorScheme_mst objColor = new ColorScheme_mst(); colColor = objColor.Get_All_By_CallStatus("NonSLA"); foreach (ColorScheme_mst objCol in colColor) { e.Row.BackColor = (System.Drawing.Color)colConvert.ConvertFromString(objCol.Colorname); } } } } #endregion #region Apply Color Coding to Close Calls if (varStatusClose.ToLower() == objStatus.Statusname.ToString().ToLower()) { ColorScheme_mst objColor = new ColorScheme_mst(); colColor = objColor.Get_All_By_CallStatus(varStatusClose); foreach (ColorScheme_mst obj in colColor) { try { e.Row.BackColor = (System.Drawing.Color)colConvert.ConvertFromString(obj.Colorname); } catch (Exception ex) { e.Row.BackColor = (System.Drawing.Color)colConvert.ConvertFromString("White"); } } } #endregion #region Apply Color Coding to On Hold Calls if (varStatusOnHold.ToLower() == objStatus.Statusname.ToString().ToLower()) { ColorScheme_mst objColor = new ColorScheme_mst(); colColor = objColor.Get_All_By_CallStatus(varStatusOnHold); foreach (ColorScheme_mst obj in colColor) { e.Row.BackColor = (System.Drawing.Color)colConvert.ConvertFromString(obj.Colorname); } } #endregion #region Apply Color Coding to Resolved Calls if (varStatusResolved.ToLower() == objStatus.Statusname.ToString().ToLower()) { ColorScheme_mst objColor = new ColorScheme_mst(); colColor = objColor.Get_All_By_CallStatus(varStatusResolved); foreach (ColorScheme_mst obj in colColor) { e.Row.BackColor = (System.Drawing.Color)colConvert.ConvertFromString(obj.Colorname); } } #endregion } }
public void SentmailUser(int userid, int incidentid, string status) { objIncident = objIncident.Get_By_id(incidentid); //added by lalit 02 nov to get resolution and show it to user when call closed mail goes to user objIncidentResolution = objIncidentResolution.Get_By_id(incidentid); //end objSite = objSite.Get_By_id(objIncident.Siteid); objAreaManager = objAreaManager.Get_By_id(objSite.Siteid); objIncidentStates = objIncidentStates.Get_By_id(incidentid); objPriority = objPriority.Get_By_id(objIncidentStates.Priorityid); objUser = objUser.Get_By_id(objIncident.Requesterid); objC_info = objC_info.Get_By_id(userid); objtech = objtech.Get_By_id(objIncidentStates.Technicianid); colemailid = objemail.Get_All_userid(userid); string strStatusOpen = Resources.MessageResource.strStatusOpen.ToString(); string strStatusClose = Resources.MessageResource.strStatusClose.ToString(); string strYourSinscerely = Resources.MessageResource.strYourSinscerely.ToString(); string strContactNumber = Resources.MessageResource.strContactNumber.ToString(); if (strStatusOpen.ToLower() == status.ToLower()) { foreach (UserEmail obj1 in colemailid) { if (obj1.Emailid != null) { obj.From = Resources.MessageResource.strAdminEmail.ToString(); obj.To = obj1.Emailid; obj.CC = objAreaManager.Email; obj.Subject = "Call Logged. Ticket Id : " + incidentid; obj.Body = "Dear " + objC_info.Firstname + ",<br/><br/> Thank you for contacting IT Service desk, please find below the new Ticket Id details for your future reference.<br/><br/><b>Incident Details : </b> <br/><br/><b>Ticket Id :</b> " + incidentid + "<br/><b>Site :</b> " + objSite.Sitename + "<br/><b>Logged Date & Time :</b> " + objIncident.Createdatetime + "<br/><b>Description :</b> " + objIncident.Description + "<br/><b>Priority :</b> " + objPriority.Name + "<br/><b>Username :</b> " + objUser.Username + "<br/><b>EstimatedResolutionTime :</b> " + GetResolutionTimeInHours(objIncident.Slaid) + "<br/><b>Email Address :</b> " + objC_info.Emailid + "<br/><br/> For any other support, kindly get in touch with us at " + strContactNumber + ".<br/><br/> <b>This is an auto generated mail. Please do not reply.</b><br/><br/><b>Yours sincerely,</b><br/><br/> <b> " + strYourSinscerely + "</b>"; obj.SmtpServer = Resources.MessageResource.strSMTPServer.ToString(); obj.SentMail(); string varPriority = Resources.MessageResource.strPriorityHigh.ToString(); if (objPriority.Priorityid != 0) { if (objPriority.Name.ToLower() == varPriority.ToLower()) { SentMailToSDM(objSite.Siteid, incidentid, objUser.Userid); } } } } //if (objC_info.Emailid != null) //{ // obj.From = Resources.MessageResource.strAdminEmail.ToString(); // obj.To = objC_info.Emailid; // obj.Subject = " New Call Logged. Ticket Id : " + incidentid; // obj.Body = "Dear User,<br/> Thank you for contacting Service desk, please find below the Ticket Id details for your future reference.<br/><br/><b>Complaints Details : </b> <br/><br/><b>Ticket Id :</b>" + incidentid + "<br/><b>Title of Call :</b>" + objIncident.Title + " <br/><b>Site :</b>" + objSite.Sitename + "<br/><b>Logged Date & Time   :</b>" + objIncident.Createdatetime + "<br/><b>Description :</b>" + objIncident.Description + "<br/><b>Priority :</b> " + objPriority.Name + "<br/><b>UserName :</b>" + objUser.Username + "<br/><b>Mail Address :</b>" + objC_info.Emailid + "<br/><br/> For any other support kindly get in touch with us at <b>" + strContactNumber + "</b>.<br/><br/> <b>This is an auto generated mail. Please do not reply.</b><br/><br/><b>Yours sincerely,</b><br/> <b>" + strYourSinscerely + "</b>"; // obj.SmtpServer = Resources.MessageResource.strSMTPServer.ToString(); // //obj.SentMail(); // string varPriority = Resources.MessageResource.strPriorityHigh.ToString(); // if (objPriority.Priorityid != 0) // { // if (objPriority.Name.ToLower() == varPriority.ToLower()) // { // SentMailToSDM(objSite.Siteid, incidentid, objUser.Userid); // } // } //} } if (strStatusClose.ToLower() == status.ToLower()) { foreach (UserEmail obj1 in colemailid) { if (obj1.Emailid != null) { int id = Convert.ToInt16(objIncident.Incidentid); string varServerName1; string varfeedbackmode; varServerName1 = Resources.MessageResource.serverNameForChangePage.ToString(); //added by lalit to check feedback mode. feedback should add in mail or not. //fetching value from resouce file which is from appsettting page. varfeedbackmode = Resources.MessageResource.UserFeedbackmode.ToString(); string url11; url11 = "http://" + varServerName1 + "/" + getpath() + "/LoginPageAccess/CustomerFeedback.aspx?userid=" + userid + "&Clid=" + objIncident.Incidentid; //url11 = "../LoginPageAccess/CustomerFeedback.aspx?userid=" + userid + "&Clid=" + objIncident.Incidentid; if (objC_info.Emailid != null) { // string url; // url = "<a href=" + url11 + "&userid=" + objC_info.Firstname + " ' onclick=window.open()>Your Feedback</a>"; string url = "<a href=" + url11 + " ' onclick=window.open()>Your Feedback</a>"; obj.From = Resources.MessageResource.strAdminEmail.ToString(); obj.To = obj1.Emailid; obj.CC = objAreaManager.Email; obj.Subject = "Call Closed Ticket id : " + incidentid; //added by lalit if (varfeedbackmode == "0") //0 means default mode where user will not recieve link in mail to give feedback { obj.Body = "Dear " + objC_info.Firstname + ",<br/><br/> <b>Incident Status:</b> Issue Resolved and call closed by <b>" + objtech.Username + "</b> on <b>" + objIncident.Completedtime + ".<br/><br/></b>We are pleased to confirm that the Service Call reported by you has been attended and resolved, should there be any further questions or queries, please do not hesitate to contact the Service Desk." + "<br/><br/><b>Incident Details : </b> <br/><br/><b>Ticket Id :</b> " + incidentid + "<br/><b>Site :</b> " + objSite.Sitename + "<br/><b>Logged Date & Time :</b> " + objIncident.Createdatetime + "<br/><b>Closed Date & Time :</b> " + objIncident.Completedtime + "<br/><b>Description :</b> " + objIncident.Description + "<br/><b>Resolution :</b> " + objIncidentResolution.Resolution + "<br/><b>Priority :</b> " + objPriority.Name + "<br/><b>Username :</b> " + objUser.Username + "<br/><b>Email Address :</b> " + objC_info.Emailid + "<br/><br/> For any other support, kindly get in touch with us at " + strContactNumber + ".<br/><br/> <b>This is an auto generated mail. Please do not reply.</b><br/><br/><b>Yours sincerely,</b><br/><br/> <b>" + strYourSinscerely + "</b>"; } else { obj.Body = "Dear " + objC_info.Firstname + ",<br/><br/> <b>Incident Status:</b> Issue Resolved and call closed by <b>" + objtech.Username + "</b> on <b>" + objIncident.Completedtime + ".<br/><br/></b>We are pleased to confirm that the Service Call reported by you has been attended and resolved, should there be any further questions or queries, please do not hesitate to contact the Service Desk." + "<br/><br/><b>Incident Details : </b> <br/><br/><b>Ticket Id :</b> " + incidentid + "<br/><b>Site :</b> " + objSite.Sitename + "<br/><b>Logged Date & Time :</b> " + objIncident.Createdatetime + "<br/><b>Closed Date & Time :</b> " + objIncident.Completedtime + "<br/><b>Description :</b> " + objIncident.Description + "<br/><b>Resolution :</b> " + objIncidentResolution.Resolution + "<br/><b>Priority :</b> " + objPriority.Name + "<br/><b>Username :</b> " + objUser.Username + "<br/><b>Email Address :</b> " + objC_info.Emailid + "<br/><br/> For any other support, kindly get in touch with us at " + strContactNumber + ".<br/><br/>To give feedback click on " + url + ".<br/><br/> <b>This is an auto generated mail. Please do not reply.</b><br/><br/><b>Yours sincerely,</b><br/><br/> <b>" + strYourSinscerely + "</b>"; } obj.SmtpServer = Resources.MessageResource.strSMTPServer.ToString(); obj.SentMail(); } } } //int id = Convert.ToInt16(objIncident.Incidentid); //string varServerName1; //varServerName1 = Resources.MessageResource.serverNameForChangePage.ToString(); //// varServerName = "10.80.0.15"; //string url11; //url11 = "http://" + varServerName1 + "/BESTN/LoginPageAccess/CustomerFeedback.aspx?incident=" + id; //if (objC_info.Emailid != null) //{ // string url; // url = "<a href=" + url11 + "&userid=" + objC_info.Firstname + " ' onclick=window.open()>Your Feedback</a>"; // obj.From = Resources.MessageResource.strAdminEmail.ToString(); // obj.To = objC_info.Emailid; // obj.Subject = "Call Closed Ticket id : " + incidentid; // obj.Body = "Dear User,<br/> <b>Complaint Status:</b>Problem solved and call closed by <b>" + objtech.Username + "</b> on <b>" + objIncident.Completedtime + "</b>.We are pleased to inform you that your reported Service Call has been attended and problem solved as informed by our engineer.<br/>Should there be any further questions or queries, please do not hesitate to contact the Service Desk on 0120 4393941, quoting your Ticket Reference Number. " + "<br/><br/><b>Complaints Details : </b> <br/><br/><b>Ticket Id :</b>" + incidentid + "<br/><b>Title of Call :</b>" + objIncident.Title + " <br/><b>Site :</b>" + objSite.Sitename + "</br><b>Logged Date & Time   :</b>" + objIncident.Createdatetime + "<br/><b>Description :</b>" + objIncident.Description + "<br/><b>Priority :</b> " + objPriority.Name + "<br/><b>UserName :</b>" + objUser.Username + "<br/><b>Mail Address :</b>" + objC_info.Emailid + "<br/><br/> For any other support kindly get in touch with us at <b>" + strContactNumber + "</b>.<br/><br/> <b>This is an auto generated mail. Please do not reply.</b><br/><br/><b>Your Feedback</b><br/><br/>" + url + "<br/><br/><b>Yours sincerely,</b><br/> <b>" + strYourSinscerely + "</b>"; // obj.SmtpServer = obj.SmtpServer = Resources.MessageResource.strSMTPServer.ToString(); // // obj.SentMail(); //} } }
//protected void BindDropImpact() //{ // colImpact = objImpact.Get_All(); // drpImpact.DataTextField = "impactname"; // drpImpact.DataValueField = "impactid"; // drpImpact.DataSource = colImpact; // drpImpact.DataBind(); // ListItem item = new ListItem(); // item.Text = "------Select Impact------"; // item.Value = "0"; // drpImpact.Items.Add(item); // drpImpact.SelectedValue = "0"; //} protected void BindDropSite() { string userName; MembershipUser User = Membership.GetUser(); userName = User.UserName.ToString(); if (userName != "") { int userid; objOrganization = objOrganization.Get_Organization(); objUser = objUser.Get_UserLogin_By_UserName(userName, objOrganization.Orgid); if (objUser.Userid != 0) { userid = objUser.Userid; colUserToSite = ObjUserToSite.Get_All_By_userid(userid); foreach (UserToSiteMapping obj in colUserToSite) { int siteid; Site_mst objSite1 = new Site_mst(); siteid = obj.Siteid; objSite1 = objSite1.Get_By_id(siteid); if (objSite1.Siteid != 0) { colSite.Add(objSite1); } } } //------------------------ for (int i = 0; i < colSite.Count; i++) { for (int j = i; j < colSite.Count; j++) { if (String.Compare(colSite[i].Sitename, colSite[j].Sitename) > 0) { Site_mst obj = new Site_mst(); obj = colSite[i]; colSite[i] = colSite[j]; colSite[j] = obj; } } } drpSite.DataTextField = "sitename"; drpSite.DataValueField = "siteid"; drpSite.DataSource = colSite; drpSite.DataBind(); //ListItem item = new ListItem(); //item.Text = "------Select Site------"; //item.Value = "0"; //drpSite.Items.Add(item); //drpSite.SelectedValue = "0"; } }
//Added by Lalit public void BindDropCustomer() { BLLCollection <Customer_mst> colCtS = new BLLCollection <Customer_mst>(); string userName = ""; MembershipUser User = Membership.GetUser(); if (User != null) { userName = User.UserName.ToString(); } if (userName != "") { int userid; int Flagcount = 0; objOrganization = objOrganization.Get_Organization(); objUser = objUser.Get_UserLogin_By_UserName(userName, objOrganization.Orgid); if (objUser.Userid != 0) { userid = objUser.Userid; colUserToSite = ObjUserToSite.Get_All_By_userid(userid); foreach (UserToSiteMapping obj in colUserToSite) { int siteid; Site_mst objSite1 = new Site_mst(); siteid = obj.Siteid; objSite1 = objSite1.Get_By_id(siteid); if (objSite1.Siteid != 0) { colCustToSite = objCustToSite.Get_All_By_siteid(objSite1.Siteid); foreach (CustomerToSiteMapping objcts in colCustToSite) { Customer_mst objC = new Customer_mst(); int FlagStatus = 0; objC = objC.Get_By_id(objcts.Custid); if (Flagcount == 0) { colCtS.Add(objC); } else { foreach (Customer_mst objCus in colCtS) { if (objC.Custid == objCus.Custid) { FlagStatus = 1; } } if (FlagStatus == 0) { colCtS.Add(objC); } } Flagcount = Flagcount + 1; } } } } //} //DdlStock.DataBind(); // DdlOwner.DataTextField = "Customer_Name"; // DdlOwner.DataValueField = "CustId"; // DdlOwner.DataSource = colCtS; // DdlOwner.DataBind(); //if (colCtS.Count == 0) //{ ListItem item = new ListItem(); item.Text = "Other"; //item.Value = "1"; // DdlOwner.Items.Add(item); //} } }
public void BindDropCustomer() { //colCust = objCustomer.Get_All(); //drpCustomer.DataTextField = "Customer_Name"; //drpCustomer.DataValueField = "CustId"; //drpCustomer.DataSource = colCust; //drpCustomer.DataBind(); //ListItem item = new ListItem(); //item.Text = "------------Select-------------"; //item.Value = "0"; //drpCustomer.Items.Add(item); //drpCustomer.SelectedValue = "0"; BLLCollection<Customer_mst> colCtS = new BLLCollection<Customer_mst>(); string userName = ""; MembershipUser User = Membership.GetUser(); if (User != null) { userName = User.UserName.ToString(); } if (userName != "") { int userid; int Flagcount = 0; objOrganization = objOrganization.Get_Organization(); objUser = objUser.Get_UserLogin_By_UserName(userName, objOrganization.Orgid); if (objUser.Userid != 0) { userid = objUser.Userid; colUserToSite = ObjUserToSite.Get_All_By_userid(userid); foreach (UserToSiteMapping obj in colUserToSite) { int siteid; Site_mst objSite1 = new Site_mst(); siteid = obj.Siteid; objSite1 = objSite1.Get_By_id(siteid); if (objSite1.Siteid != 0) { colCustToSite = objCustToSite.Get_All_By_siteid(objSite1.Siteid); foreach (CustomerToSiteMapping objcts in colCustToSite) { Customer_mst objC = new Customer_mst(); int FlagStatus = 0; objC = objC.Get_By_id(objcts.Custid); if (Flagcount == 0) { colCtS.Add(objC); } else { foreach (Customer_mst objCus in colCtS) { if (objC.Custid == objCus.Custid) { FlagStatus = 1; } } if (FlagStatus == 0) { colCtS.Add(objC); } } Flagcount = Flagcount + 1; } } } } } drpCustomer.DataTextField = "Customer_Name"; drpCustomer.DataValueField = "CustId"; drpCustomer.DataSource = colCtS; drpCustomer.DataBind(); if (colCtS.Count == 0) { ListItem item = new ListItem(); item.Text = "-------------Select-------------"; item.Value = "0"; drpCustomer.Items.Add(item); } }