using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace CheckSheet.setting
{
    public partial class Register_equipment_delete : System.Web.UI.Page
    {

       
        [System.Web.Services.WebMethod]
        public static string sendmail(string parahd)
        {

            byte[] datahd = System.Convert.FromBase64String(parahd);
            string base64Decoded = System.Text.ASCIIEncoding.UTF8.GetString(datahd);
            string[] strmt = base64Decoded.Split('|');
            try
            {
                string linegroup = strmt[0].ToString();
                string linename = strmt[1].ToString();
                string machineid = strmt[2].ToString();
                string machinename = strmt[3].ToString();
                string partnumber = strmt[4].ToString();
                string notice = strmt[5].ToString();

                string detail = "Line group id : " + linegroup + "<br/>";
                detail = detail + "Line group name : " + linename + "<br/>";
                detail = detail + "Machine id : " + machineid + "<br/>";
                detail = detail + "Machine name : " + machinename + "<br/>";
                detail = detail + "Partnumber : " + partnumber + "<br/>";
                detail = detail + "Notice : " + notice;


                string userapprove = clsControlUI.getuserapprove("2", "1", partnumber);
                clsControlUI.sendemail_delete_linegroup(linegroup, partnumber, machineid, detail, "Check sheet document waiting for approval.", userapprove);
            }
            catch { }
            return "";

        }

        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnback_Click(object sender, EventArgs e)
        {
            Response.Redirect("RegisterEquipment");
        }
    }
}