コード例 #1
0
ファイル: StateSetup.aspx.cs プロジェクト: maziesmith/HAC
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Request.QueryString[SystemConstants.StateID] != null)
                {
                    int stateID = Convert.ToInt32(Request.QueryString[SystemConstants.StateID]);
                    var dac     = new AdministrationDAC();
                    AdministrationEDSC.StateDTRow dr = null;

                    if (stateID != 0)
                    {
                        dr = dac.RetrieveState(stateID);
                        StateSetupUC1.Mode = SystemConstants.FormMode.Edit;
                        StateSetupUC1.SetData(dr);
                    }
                    else
                    {
                        dr = new AdministrationEDSC.StateDTDataTable().NewStateDTRow();
                        StateSetupUC1.Mode = SystemConstants.FormMode.New;
                    }
                }
                CheckSignIn();
            }
        }