Ejemplo n.º 1
0
        public void CRUD_Saving()
        {
            if (ChkSelectedSuppliersAll.Checked)
            {
                SelectionLST = new List <DataGrdSupplierListSelection>();
                DataGrdSupplierListSelection o = new DataGrdSupplierListSelection();
                NAS.DAL.Nomenclature.Organization.SupplierOrg.Populate();
                NAS.DAL.Nomenclature.Organization.SupplierOrg s =
                    session.FindObject <NAS.DAL.Nomenclature.Organization.SupplierOrg>(
                        new BinaryOperator("Code", Utility.Constant.NAAN_DEFAULT_CODE_SELECTEDALL, BinaryOperatorType.Equal));
                o.OrganizationId = s.OrganizationId;
                o.Code           = s.Code;
                o.Name           = s.Name;
                SelectionLST.Add(o);
            }

            RuleObject.SaveRuleCondition(session, KeyValue, SelectionLST);
        }
Ejemplo n.º 2
0
        public void CRUD_Preview()
        {
            List <object> fieldValues = grdSupplierList.GetSelectedFieldValues(new string[] { "OrganizationId", "Code", "Name" });

            SelectionLST = new List <DataGrdSupplierListSelection>();
            foreach (object[] item in fieldValues)
            {
                DataGrdSupplierListSelection o = new DataGrdSupplierListSelection();
                /*2013-11-24 ERP-1118 Khoa.Truong MOD START*/
                //o.OrganizationId = Guid.Parse(item[0].ToString());
                //o.Code = item[1].ToString();
                //o.Name = item[2].ToString();
                o.OrganizationId = item[0] != null?Guid.Parse(item[0].ToString()) : Guid.Empty;

                o.Code = item[1] != null ? item[1].ToString() : String.Empty;
                o.Name = item[2] != null ? item[2].ToString() : String.Empty;
                /*2013-11-24 ERP-1118 Khoa.Truong MOD END*/
                SelectionLST.Add(o);
            }

            grdSupplierListPreview.DataSource = SelectionLST;
            grdSupplierListPreview.DataBind();
        }