Example #1
0
        public static string getPartEdge(string pncode)
        {
            string res = string.Empty;

            try
            {
                string sql = "SELECT [PartNO],[EdgeType] FROM [FGA_PLATFORM].[dbo].[ARG_part_edgetype] WHERE PartNO ='" + pncode.Trim() + "'";

                DataSet ds = new DataSet();
                ds = FGA_DAL.Base.SQLServerHelper_FGA.Query(sql);
                if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
                {
                    List <ARG_BoxLabelModel> luw = new List <ARG_BoxLabelModel>();
                    foreach (DataRow row in ds.Tables[0].Rows)
                    {
                        ARG_BoxLabelModel ERM = new ARG_BoxLabelModel(row);
                        luw.Add(ERM);
                    }

                    JavaScriptSerializer jssl = new JavaScriptSerializer();
                    res = jssl.Serialize(luw);
                }
            }
            catch (Exception e)
            {
            }
            return(res);
        }
Example #2
0
        public static string getPartAcc(string pncode)
        {
            string res = string.Empty;

            try
            {
                string sql = "SELECT pp.Part_No as [Component_Part],pp.Part_Type as [Component_Type] " +
                             "FROM[PlexDB].[dbo].[Part_v_BOM] pb left join[PlexDB].[dbo].[Part_v_Part_Operation] ppo on pb.Part_Key = ppo.Part_Key " +
                             "and pb.Part_Operation_Key = ppo.Part_Operation_Key " +
                             "left join[PlexDB].[dbo].[Part_v_part] pp on pb.Component_Part_Key = pp.Part_Key " +
                             "where pb.part_key = (select part_key from[PlexDB].[dbo].[part_v_part] " +
                             "where part_no = '" + pncode.Trim() + "')  and pp.Part_No not like 'BH%' and pp.Part_NO not like 'BU%'" +
                             "and(ppo.Operation_No = '1500' or ppo.Operation_No = '1400') ";

                DataSet ds = new DataSet();
                ds = FGA_DAL.Base.SQLServerHelper_Plex.Query(sql);
                if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
                {
                    List <ARG_BoxLabelModel> luw = new List <ARG_BoxLabelModel>();
                    foreach (DataRow row in ds.Tables[0].Rows)
                    {
                        ARG_BoxLabelModel ERM = new ARG_BoxLabelModel(row);
                        luw.Add(ERM);
                    }

                    JavaScriptSerializer jssl = new JavaScriptSerializer();
                    res = jssl.Serialize(luw);
                }
            }
            catch (Exception e)
            {
            }
            return(res);
        }