Beispiel #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Page.Header.DataBind();

            if (!IsPostBack)
            {
                //set autorization page
                UserProfile.SetAuthorization(new string[] { UserProfile.USER_EKSTERNAL, UserProfile.USER_INTERNAL });

                //set sp3m id and sp3m number
                NoSP3M     = string.Empty;
                SP3M_ID    = string.IsNullOrEmpty((string)Request.QueryString["SP3M_ID"]) ? 0 : Convert.ToInt16(Request.QueryString["SP3M_ID"]);
                StatusSP3M = string.IsNullOrEmpty((string)Request.QueryString["Status"]) ? string.Empty : Request.QueryString["Status"].ToString().ToUpper();
                hfSP3MId.Set("Id", SP3M_ID.ToString());

                //binding force combobox
                cmbForce.DataSource = MasterDataEntity.GetMasterDataForce();
                cmbForce.DataBind();

                //binding unity combobox
                cmbUnity.DataSource = MasterDataEntity.GetMasterDataUnity();
                cmbUnity.DataBind();

                //binding sp3m control
                BindingSP3M(SP3M_ID);

                //set grid product sp3m
                gvProductSP3M.DataSource = ListProductSP3M(SP3M_ID);
                gvProductSP3M.DataBind();

                //set sp3m is editable
                if (StatusSP3M.Contains("SAVED"))
                {
                    SetEnabled(true);
                    SetEnabledButton(UserProfile.Roles, StatusSP3M);
                    btnClose.ClientVisible  = true;
                    btnCancel.ClientVisible = false;
                }
                else
                {
                    //new entry
                    if (SP3M_ID == 0)
                    {
                        SetEnabled(true);
                        SetEnabledButton(UserProfile.Roles, StatusSP3M);
                    }
                    else
                    {
                        SetEnabled(false);
                        SetEnabledButton(UserProfile.Roles, StatusSP3M);
                    }
                }
            }
        }
Beispiel #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                //binding force tbbm
                cmbTBBM.DataSource = MasterDataEntity.GetMasterDataTBBM(CommonDataModel.ActiveType.Active);
                cmbTBBM.DataBind();

                //binding force combobox
                cmbForce.DataSource = MasterDataEntity.GetMasterDataForce();
                cmbForce.DataBind();

                //binding unity combobox
                cmbUnity.DataSource = MasterDataEntity.GetMasterDataUnity();
                cmbUnity.DataBind();
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                //binding force tbbm
                cmbTBBM.DataSource = MasterDataEntity.GetMasterDataTBBM(CommonDataModel.ActiveType.Active);
                cmbTBBM.DataBind();

                //binding force combobox
                cmbForce.DataSource = MasterDataEntity.GetMasterDataForce();
                cmbForce.DataBind();

                //binding unity combobox
                cmbUnity.DataSource = MasterDataEntity.GetMasterDataUnity();
                cmbUnity.DataBind();

                //Report.xReportOAT report = new FrancoHandling_App.Report.xReportOAT();
                //docViewer.OpenReport(report);
            }
        }