예제 #1
0
 private void OnObslugaPolecen(ExecutingCommandEventArgs e)
 {
     if (obslugaPolecen != null)
     {
         obslugaPolecen(this, e);
     }
 }
예제 #2
0
 protected void OnEcexuteCommand(ExecutingCommandEventArgs e)
 {
     if (executeCommand != null)
     {
         executeCommand(this, e);
     }
 }
예제 #3
0
 protected void OnWykonaniePolecenia(ExecutingCommandEventArgs e)
 {
     if (wykonaniePolecenia != null)
     {
         wykonaniePolecenia(this, e);
     }
 }
예제 #4
0
        protected void OnItemCommand(ExecutingCommandEventArgs e)
        {
            if (itemCommand != null)
            {
                switch (e.CommandName)
                {
                /*case "zapiszNowegoInteresanta":
                 *  presenter.SaveNewCustomer(WybraneID("rodzajNowegoInteresanta"), ZawartoscPola("nowyInteresantImie"), ZawartoscPola("nowyInteresantNazwisko"), ZawartoscPola("nowyInteresantNazwa"),
                 *      ZawartoscPola("nowyKod"), ZawartoscPola("nowyMiejscowosc"), ZawartoscPola("nowyUlica"), ZawartoscPola("nowyBudynek"), ZawartoscPola("nowyLokal"), ZawartoscPola("nowyPoczta"));
                 *  break;
                 * case "listaInteresantow":
                 *  pozycja.FindControl("nowyInteresant").Visible = false;
                 *  pozycja.FindControl("interesant").Visible = true;
                 *  break;*/
                case "zapisz":
                    if (Page.IsValid)
                    {
                        if ((pozycja.FindControl("customer") as Interesant).IdInteresanta > 0)
                        {
                            string dodatkoweMaterialy = (pozycja.FindControl("fdodatkoweMaterialy") as TextBox).Text;
                            //if (!string.IsNullOrEmpty(dodatkoweMaterialy.Trim()) && !IsAdditionalDescriptionValid(dodatkoweMaterialy)
                            //{


                            //}
                            presenter.SaveItem(generujPozycje(), (Session["ESPDocId"] != null) ? Session["ESPDocId"].ToString() : string.Empty);
                            Session["ESPDocId"] = null;

                            string parentPage = (string)Session["parentPage"];
                            if (parentPage == "a")
                            {
                                Response.Redirect("PrzegladDziennika.aspx");
                            }
                            else         //if (parentPage == "s")
                            {
                                Response.Redirect("PrzegladDziennikaSimple.aspx");
                            }
                        }
                        else
                        {
                            //Session["StateBeforeError"] = this.SaveViewState();
                            lblMessage.Text = "Nale¿y wybraæ interesanta";
                        }
                    }
                    break;

                default:
                    itemCommand(this, e);
                    break;
                }
            }
        }
예제 #5
0
        void ExecuteCommand(object sender, ExecutingCommandEventArgs e)
        {
            switch (e.CommandName)
            {
            case "newItem":
                Session["itemId"] = e.CommandArgument;
                (new DocumentDAO()).SetESPDocumentStatus(new Guid(Session["ESPDocId"].ToString()), DocumentDAO.ESPDocumentStatus.Adding);
                Response.Redirect("EdycjaPozycjiDziennika.aspx");
                break;

            default:
                break;
            }
        }
예제 #6
0
        void ExecuteCommand(object sender, ExecutingCommandEventArgs e)
        {
            if (e.CommandSource != null)
            {
                GridViewRow row = (GridViewRow)(((LinkButton)e.CommandSource).NamingContainer);

                Label lblID = (Label)row.FindControl("lblID");
                if (lblID != null)
                {
                    ((IViewRegistryView)this).RegistryID = int.Parse(lblID.Text);//Session["registryId"] = lblID.Text;
                }
            }
            switch (e.CommandName)
            {
            case "itemEdit":
                //Session["registryId"] = ((IViewRegistryView)this).RegistryID;
                Session["itemId"]   = e.CommandArgument;
                Session["ESPDocId"] = null;
                Response.Redirect("EdycjaPozycjiDziennika.aspx?pp=a");
                break;

            case "itemScans":
                //Session["registryId"] = ((IViewRegistryView)this).RegistryID;
                Session["itemId"] = e.CommandArgument.ToString();
                Response.Redirect("EdycjaSkanowPozycjiDziennika.aspx?pp=a");
                break;

            case "itemHistory":
                //Session["registryId"] = ((IViewRegistryView)this).RegistryID;
                Session["itemId"] = e.CommandArgument.ToString();
                Response.Redirect("SzczegolyPozycjiDziennika.aspx?pp=a");
                break;

            case "itemDocHistory":
                //Session["registryId"] = ((IViewRegistryView)this).RegistryID;
                Session["itemId"] = e.CommandArgument.ToString();
                Response.Redirect("HistoriaDokumentuPozycjiDziennika.aspx?pp=a");
                break;

            case "itemEditRF":
                //Session["registryId"] = ((IViewRegistryView)this).RegistryID;
                Session["itemId"]   = e.CommandArgument;
                Session["ESPDocId"] = null;
                Response.Redirect("EdycjaPozycjiDziennika.aspx?pp=a&rf=1");
                break;

            case "itemScansRF":
                //Session["registryId"] = ((IViewRegistryView)this).RegistryID;
                Session["itemId"] = e.CommandArgument.ToString();
                Response.Redirect("EdycjaSkanowPozycjiDziennika.aspx?pp=a&rf=1");
                break;

            case "itemHistoryRF":
                //Session["registryId"] = ((IViewRegistryView)this).RegistryID;
                Session["itemId"] = e.CommandArgument.ToString();
                Response.Redirect("SzczegolyPozycjiDziennika.aspx?pp=a&rf=1");
                break;

            case "itemDocHistoryRF":
                //Session["registryId"] = ((IViewRegistryView)this).RegistryID;
                Session["itemId"] = e.CommandArgument.ToString();
                Response.Redirect("HistoriaDokumentuPozycjiDziennika.aspx?pp=a&rf=1");
                break;
            }
        }