Ejemplo n.º 1
0
        public ZOO_PHIEUNHAPTHUOC_InsResult LuuPhieuNhap(ZOO_PHIEUNHAPTHUOC data)
        {
            try
            {
                using (var dataContext = new AssetDataContext())
                {
                    ZOO_PHIEUNHAPTHUOC_InsResult result = dataContext.ZOO_PHIEUNHAPTHUOC_Ins(
                        data.MaLo,
                        data.SoLuong,
                        data.NgayNhap == null ? "" : data.NgayNhap.Value.ToString(formatDate),

                        data.NOTES,
                        data.RECORD_STATUS,
                        data.MAKER_ID,
                        data.CREATE_DT == null ? "" : data.CREATE_DT.Value.ToString(formatDate),
                        data.AUTH_STATUS,
                        data.CHECKER_ID,
                        data.APPROVE_DT == null ? "" : data.APPROVE_DT.Value.ToString(formatDate)
                        ).FirstOrDefault();

                    return(result);
                }
            }
            catch (Exception ex)
            {
                return(new ZOO_PHIEUNHAPTHUOC_InsResult()
                {
                    Result = "-1", ErrorDesc = ex.Message, MaPhieuNhap = ""
                });
            }
        }
Ejemplo n.º 2
0
 //Received Message
 private void CurrencyEditResponseMessageReceived(ParentMessage obj)
 {
     //OK button clicked
     if (obj.currentObject != null)
     {
         ZOO_PHIEUNHAPTHUOC newitem = (obj.currentObject as ZOO_PHIEUNHAPTHUOC);
         this.DANHSACHPHIEUNHAP.Add(newitem);
     }
     else
     {
         this.messagePop.Reset();
         ActionMenuButton.actionControl.SetAllAction(actionButton, null, actionButton, actionButton, actionButton, actionButton, null);
         PageAnimation.ToFront();
     }
 }