Ejemplo n.º 1
0
        private void Save_item()
        {
            AssignSubItems(itmlist);
            Modify_SubItems();
            foreach (tbl_000_H_ITEM i in itmlist)
            {
                i.DocID    = 0;
                i.YEARUSED = UserSettings.LogInYear;
                i.IsCopied = true;
                i.CopyDate = DateTime.Now;
                //Component List
                if (cleaned_list_itmcom.Count > 0)
                {
                    i.itemCom = cleaned_list_itmcom;
                }
                //Tabulation
                if (cleaned_list_itmpi.Count > 0)
                {
                    i.itemPI = cleaned_list_itmpi;
                }
                if (cleaned_list_itmvp.Count > 0)
                {
                    i.itemVP = cleaned_list_itmvp;
                }
                if (cleaned_list_itmassy.Count > 0)
                {
                    i.itemAssy = cleaned_list_itmassy;
                }
                //MPT
                if (cleaned_list_itmmpt.Count > 0)
                {
                    i.itemMPT = cleaned_list_itmmpt;
                }
                //FDC
                if (cleaned_list_itmfdc.Count > 0)
                {
                    i.itemFDC = cleaned_list_itmfdc;
                }
                cleaned_list_itm.Add(i);
            }

            if (itmbal.Save_List(cleaned_list_itm))
            {
                if (cleaned_list_itm.Count > 0)
                {
                    finishing_msg = msgval_success;
                }
                else
                {
                    finishing_msg = msgval_nochanges;
                }
                MessageHelpers.ShowInfo(finishing_msg);
                MyCaller_itm.RefreshGrid();
            }
        }