예제 #1
0
        public void SoSave()
        {
            if (false == CheckValues())
            {
                return;
            }
            So so = GetValues();

            if (!SoMgr.SaveSoMain(so))
            {
                MessageBox.Show("Save Sale Order Error!");
                return;
            }
            int soId = SoMgr.GetTheInsertId(so.salesId);

            foreach (SoItemsContentAndState sics in soItemsStateList)
            {
                sics.soitem.soId = soId;
            }
            SoMgr.UpdateSoItems(soItemsStateList);

            new AmbleClient.RfqGui.RfqManager.RfqMgr().ChangeRfqState(RfqStatesEnum.HasSO, rfqId);

            MessageBox.Show("Save Sale Order Successfully");
        }
예제 #2
0
        public bool SoSave()
        {
            if (false == CheckValues())
            {
                return(false);
            }
            So so = GetValues();

            if (!SoMgr.SaveSoMain(so))
            {
                MessageBox.Show("Save Sale Order Error!");
                return(false);
            }
            int soId = SoMgr.GetTheInsertId(so.salesId);

            //save an So number just for search
            SoMgr.SetSoNumber(soId);



            foreach (SoItemsContentAndState sics in soItemsStateList)
            {
                sics.soitem.soId = soId;
                AmbleClient.RfqGui.RfqManager.RfqMgr.ChangeRfqState(RfqStatesEnum.HasSO, sics.soitem.rfqId);
            }
            SoMgr.UpdateSoItems(soItemsStateList);
            MessageBox.Show("Save Sale Order Successfully");
            return(true);
        }