示例#1
0
        public static IEnumerable<Price> GetAllPrice(int InquiryID)
        {
            using (var context = new OpenMapDBEntities())
            {
                return (from t in context.PriceListEstimation
                        where t.InquiryID == InquiryID
                        select new Price {
                           // ID = t.InquiryID,
                            InquiryID = t.InquiryID,
                            ItemNo = t.ItemNo,
                            Description = t.Description,
                            MaterialSpec = t.MaterialSpec,
                            Qty =  t.Qty,
                            UnitWeight = t.UnitWeight,
                            TotalWeight = t.TotalWeight,
                            UnitPrice = t.UnitPrice,
                            TotalPrice = t.TotalPrice,
                            SPFCC = t.SPFCC,
                            SPF2Y = t.SPF2Y,
                            Remark = t.Remark,
                            Margin = t.Margin

                        }).ToList();
            }
        }
示例#2
0
        public static User Login(string PostNIK, string PostPassword )
        {
            OpenMapDBEntities openMapDB = new OpenMapDBEntities();
            try
            {
                User user = openMapDB.User.Single(u => u.NIK == PostNIK);
                if (user != null)
                {
                    string hashedPassword = EncryptPassword(PostPassword);
                    if (user.Password == hashedPassword)
                    {

                        return user;
                    }
                }
            }
            catch (InvalidOperationException e)
            {
            }

            return null;
        }