コード例 #1
0
        protected void dataSourceViewResourceReport_Inserting(object sender, ObjectContainerDataSourceInsertingEventArgs e)
        {
            //Check for blank values and set the value to 0;
            IDictionaryEnumerator myEnumerator =
                e.NewValues.GetEnumerator();

            while (myEnumerator.MoveNext())
            {
                if (string.IsNullOrEmpty(myEnumerator.Value.ToString()))
                {
                    e.NewValues[myEnumerator.Key] = "0";
                }
            }
            e.NewValues["LastUpdatedBy"] = AccountInfo.UserId;
            e.NewValues["StateFIPSCode"] = ((TextBox)formViewResourceReport.FindControl("txtStateCode")).Text;


            DropDownList cmbFrom = (DropDownList)formViewResourceReport.FindControl("cmbFromDate");
            DropDownList cmbTo   = (DropDownList)formViewResourceReport.FindControl("cmbToDate");

            e.NewValues["RepYrFrom"]     = "04/01" + "/" + cmbFrom.SelectedItem.Text;
            e.NewValues["RepYrTo"]       = "03/31" + "/" + cmbTo.SelectedItem.Text;
            e.NewValues["LastUpdatedBy"] = AccountInfo.UserId;
            //txtPersonCompletingReport
        }
コード例 #2
0
ファイル: LocationAdd.aspx.cs プロジェクト: moayyaed/SHIPNPR
 protected void dataSourceAgencyLocation_Inserting(object sender, ObjectContainerDataSourceInsertingEventArgs e)
 {
     var mailingStateValue = e.NewValues[MailingStateKey].ToString();
     e.NewValues[MailingStateKey] = (!string.IsNullOrEmpty(mailingStateValue))
                                       ? new State(mailingStateValue)
                                       : (State?)null;
     e.NewValues[PrimaryPhoneKey] = e.NewValues[PrimaryPhoneKey].ToString().FormatPhoneNumber();
     e.NewValues[SecondaryPhoneKey] = e.NewValues[SecondaryPhoneKey].ToString().FormatPhoneNumber();
     e.NewValues[TDDKey] = e.NewValues[TDDKey].ToString().FormatPhoneNumber();
     e.NewValues[TollFreeTDDKey] = e.NewValues[TollFreeTDDKey].ToString().FormatPhoneNumber();
     e.NewValues[FaxKey] = e.NewValues[FaxKey].ToString().FormatPhoneNumber();
     e.NewValues[PhysicalZipKey] = e.NewValues[PhysicalZipKey].ToString().FormatZip();
     e.NewValues[MailingZipKey] = e.NewValues[MailingZipKey].ToString().FormatZip();
     e.NewValues["State"] = DefaultState;
     e.NewValues["AgencyId"] = AgencyId;
 }
コード例 #3
0
        protected void dataSourceViewResourceReport_Inserting(object sender, ObjectContainerDataSourceInsertingEventArgs e)
        {
            //Check for blank values and set the value to 0;
            IDictionaryEnumerator myEnumerator =
                e.NewValues.GetEnumerator();

            while (myEnumerator.MoveNext())
            {
                if (string.IsNullOrEmpty(myEnumerator.Value.ToString()))
                {
                    e.NewValues[myEnumerator.Key] = "0";
                }
            }
            e.NewValues["LastUpdatedBy"] = AccountInfo.UserId;
            e.NewValues["StateFIPSCode"] = AccountInfo.StateFIPS;
            e.NewValues["RepYrFrom"]     = new DateTime(int.Parse(e.NewValues["RepYrFrom"].ToString()), DateTime.Now.Month, DateTime.Now.Day);
            e.NewValues["RepYrTo"]       = new DateTime(int.Parse(e.NewValues["RepYrTo"].ToString()), DateTime.Now.Month, DateTime.Now.Day);
            e.NewValues["LastUpdatedBy"] = AccountInfo.UserId;
        }
コード例 #4
0
 protected void dataSourceSubStateRegion_Inserting(object sender, ObjectContainerDataSourceInsertingEventArgs e)
 {
     e.NewValues["State"] = DefaultState;
 }
コード例 #5
0
 void TestableObjectContainerDataSource_Inserting(object sender, ObjectContainerDataSourceInsertingEventArgs e)
 {
     _InsertingFired = true;
 }
コード例 #6
0
 protected void dataSourceViewSpecialField_Inserting(object sender, ObjectContainerDataSourceInsertingEventArgs e)
 {
 }