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

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

       
        [System.Web.Services.WebMethod]
        public static string getmachine(string machineid)
        {
            DataSet ds;
            using (CheckSheet.FcSql.Function fc = new CheckSheet.FcSql.Function())
            {
                string query = string.Empty;
                query = string.Format(" select machineid,machinename,machine_piz from MachineMaster Where machineid='{0}'",machineid);
                ds = fc.SQL_DataSet(query.ToString());
                fc.closeconnection();
            }
            return ds.GetXml();


        }




        [System.Web.Services.WebMethod]
        public static string getempid(string empid)
        {
            DataSet ds;
            using (CheckSheet.FcSql.Function fc = new CheckSheet.FcSql.Function())
            {
                string query = string.Empty;
                query = string.Format(" SELECT userid, usercode, username, firstname, lastname, position, emailaddress,firstname+' '+lastname as empname,usercode as empid FROM  Users Where usercode='{0}'", empid);
                ds = fc.SQL_DataSet(query.ToString());
                fc.closeconnection();
            }
            return ds.GetXml();


        }



        protected void Page_Load(object sender, EventArgs e)
        {

        }

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

        protected void btninspection_Click(object sender, EventArgs e)
        {
            Response.Redirect("Machine_check_item");

        }
    }
}