protected void BindDropTechnician()
    {
        objRole = objRole.Get_RoleInfo_By_RoleName("technician");
        int roleid = Convert.ToInt16(objRole.Roleid);

        coltechnician = ObjUserLogin.Get_All_By_Role(roleid);
        drpTechnician.DataTextField  = "username";
        drpTechnician.DataValueField = "userid";
        drpTechnician.DataSource     = coltechnician;
        drpTechnician.DataBind();
        ListItem item = new ListItem();

        item.Text  = "---Select Technician---";
        item.Value = "0";
        drpTechnician.Items.Add(item);
        drpTechnician.SelectedValue = "0";
    }
Esempio n. 2
0
    public void SentMailToSDM(int siteid, int incidentid, int requesterid)
    {
        string strYourSinscerely = Resources.MessageResource.strYourSinscerely.ToString();
        string strContactNumber  = Resources.MessageResource.strContactNumber.ToString();
        int    FlagUser;
        string varRole = Resources.MessageResource.strSDMRole.ToString();
        int    roleid;

        roleid  = objRole.Get_By_RoleName(varRole);
        colUser = objUser.Get_All_By_Role(roleid);
        foreach (UserLogin_mst objusr in colUser)
        {
            FlagUser = objUserToSiteMapping.Get_By_Id(objusr.Userid, siteid);
            if (FlagUser != 0)
            {
                objIncident       = objIncident.Get_By_id(incidentid);
                objSite           = objSite.Get_By_id(objIncident.Siteid);
                objIncidentStates = objIncidentStates.Get_By_id(incidentid);
                objPriority       = objPriority.Get_By_id(objIncidentStates.Priorityid);

                UserLogin_mst obju   = new UserLogin_mst();
                UserLogin_mst objReq = new UserLogin_mst();
                obju      = obju.Get_By_id(objUserToSiteMapping.Userid);
                objC_info = objC_info.Get_By_id(objusr.Userid);
                objReq    = objReq.Get_By_id(requesterid);
                ContactInfo_mst objReqContInfo = new ContactInfo_mst();
                objReqContInfo = objReqContInfo.Get_By_id(objReq.Userid);

                obj.From       = Resources.MessageResource.strAdminEmail.ToString();
                obj.To         = objC_info.Emailid;
                obj.Subject    = "High Priority Call. Ticket Id: " + incidentid;
                obj.Body       = "Dear Sir/Madam,<br/>High Priority Call has been logged, please find below the Complaint  details .<br/><br/><b>Complaints Details : </b> <br/><br/><b>Ticket Id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:</b>" + incidentid + "<br/><b>Title of Call&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:</b>" + objIncident.Title + " <br/><b>Site&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:</b>" + objSite.Sitename + "<br/><b>Logged Date & Time&nbsp;&nbsp&nbsp;&nbsp;&nbsp;:</b>" + objIncident.Createdatetime + "<br/><b>Description&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:</b>" + objIncident.Description + "<br/><b>Priority&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:</b> " + objPriority.Name + "<br/><b>UserName&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:</b>" + objReq.Username + "<br/><b>Mail Address&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:</b>" + objReqContInfo.Emailid + "<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();
            }
        }
    }
 protected void BindDropTechnician()
 {
     objRole = objRole.Get_RoleInfo_By_RoleName("technician");
     if (objRole.Roleid != 0)
     {
         int roleid;
         roleid = objRole.Roleid;
         if (roleid != 0)
         {
             colUser = objUser.Get_All_By_Role(roleid);
             drpUserList.DataTextField  = "username";
             drpUserList.DataValueField = "userid";
             drpUserList.DataSource     = colUser;
             drpUserList.DataBind();
             ListItem item = new ListItem();
             item.Text  = "-------------Select-------------";
             item.Value = "0";
             drpUserList.Items.Add(item);
             drpUserList.SelectedValue = "0";
         }
     }
 }