Ejemplo n.º 1
0
        protected override void AfterAdd(DataRow dr)
        {
            ActivityConfig.ActivityCodeRow acr = (ActivityConfig.ActivityCodeRow)dr;

            acr.ActivityCodeID    = myA.AtMng.PKIDGet(ActivityCodeFields.ActivityCode, 1);
            acr.Communication     = false;
            acr.Milestone         = false;
            acr.Obsolete          = false;
            acr.ReadOnly          = false;
            acr.SkipRelatedFields = false;
            acr.GoToDisbursements = false;
        }
Ejemplo n.º 2
0
        protected override void AfterAdd(DataRow ddr)
        {
            string ObjectName = this.myActivityTimeDT.TableName;

            atriumDB.ActivityTimeRow       dr  = (atriumDB.ActivityTimeRow)ddr;
            ActivityConfig.ActivityCodeRow arc = myA.GetActivity().GetACSeriesRow(dr.ActivityRow).ActivityCodeRow;

            dr.ActivityTimeId = this.myA.AtMng.PKIDGet(ObjectName, 10);
            dr.Taxed          = false;
            dr.Final          = false;
            dr.Posted         = true;

            dr.FileId = dr.ActivityRow.FileId;
            if (!arc.IsDefaultHoursNull() && dr.IsHoursNull())
            {
                dr.Hours = Math.Round(arc.DefaultHours, 1);
            }
            else
            {
                dr.Hours = 0;
            }


            //  JLL: 2009-12-21 officeid should default to workingAs office and not activity row's officeid
            dr.OfficeId = myA.AtMng.WorkingAsOfficer.OfficeId;  //dr.ActivityRow.OfficeId;

            dr.OfficerId = myA.AtMng.WorkingAsOfficer.OfficerId;

            // JLL: 2009-12-21 changed to now as per PS request
            if (dr.ActivityRow.RowState == DataRowState.Added)
            {
                dr.StartTime = dr.ActivityRow.ActivityDate;
            }
            else
            {
                dr.StartTime = DateTime.Now;
            }

            CalcFees(dr);
        }
Ejemplo n.º 3
0
        protected override void AfterChange(DataColumn dc, DataRow dr)
        {
            ActivityConfig.ActivityCodeRow acr = (ActivityConfig.ActivityCodeRow)dr;
            switch (dc.ColumnName)
            {
            case ActivityCodeFields.ActivityNameEng:
                if (acr.IsNull("ActivityNameFre"))
                {
                    acr.ActivityNameFre = acr.ActivityNameEng;
                    acr.EndEdit();
                }
                break;

            case ActivityCodeFields.ActivityNameFre:
                if (acr.IsNull("ActivityNameEng"))
                {
                    acr.ActivityNameEng = acr.ActivityNameFre;
                    acr.EndEdit();
                }
                break;
            }
        }