Ejemplo n.º 1
0
 protected void gvPermohonan_CustomButtonCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonCallbackEventArgs e)
 {
     if (e.ButtonID == "Checklist")
     {
         btnCheckListAction(e.VisibleIndex);
     }
 }
Ejemplo n.º 2
0
 protected void gvPenerimaanProposal_CustomButtonCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonCallbackEventArgs e)
 {
     if (e.ButtonID == "Detail")
     {
         btnDetailAction(e.VisibleIndex);
     }
 }
Ejemplo n.º 3
0
 protected void gvPersetujuanSurvey_CustomButtonCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonCallbackEventArgs e)
 {
     if (e.ButtonID == "detail")
     {
         btnDetail(e.VisibleIndex);
     }
 }
Ejemplo n.º 4
0
        protected void grdData_CustomButtonCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonCallbackEventArgs e)
        {
            ASPxGridView grid           = sender as ASPxGridView;
            ASPxTextBox  txt_realamount = grid.FindRowTemplateControl(e.VisibleIndex, "txt_realamount") as ASPxTextBox;

            txt_realamount.Focus();
        }
Ejemplo n.º 5
0
 protected void gvDaftarJrnal_CustomButtonCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonCallbackEventArgs e)
 {
     if (e.ButtonID == "btnKoreksi")
     {
         btnKoreksiAction(e.VisibleIndex);
     }
     if (e.ButtonID == "edit")
     {
         EditAction(e.VisibleIndex);
     }
 }
Ejemplo n.º 6
0
 protected void gvPenilaianSurvey_CustomButtonCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonCallbackEventArgs e)
 {
     if (e.ButtonID == "Tambah")
     {
         tambahButtonAction(e.VisibleIndex);
     }
     else
     {
         //
     }
 }
Ejemplo n.º 7
0
    protected void grid_CustomButtonCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonCallbackEventArgs e)
    {
        String serviceName = grid.GetRowValues(e.VisibleIndex, "ServiceName").ToString();
        String methodName  = grid.GetRowValues(e.VisibleIndex, "MethodName").ToString();


        CacheManager cacheManager = CacheManager.GetInstance();

        cacheManager.RemoveCache(serviceName, methodName);

        grid.DataBind();
    }
    protected void dxgridContainer_CustomButtonCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonCallbackEventArgs e)
    {
        ASPxGridView _grid = (ASPxGridView)sender;
        string       _url  = "";

        string[] _args = { "", "", "" };
        //primary key number get containerid
        _args[0] = wwi_security.EncryptString(_grid.GetRowValues(e.VisibleIndex, _grid.KeyFieldName).ToString(), "publiship");

        switch (e.ButtonID.ToString())
        {
        case "cmdView":     //open container form in readonly mode
        {
            _args[1] = "ReadOnly";
            _args[2] = "";
            break;
        }

        case "cmdEdit":     //open container form in edit mode
        {
            _args[1] = "Edit";
            _args[2] = "";
            break;
        }

        case "cmdMarkLOB":     //open mark container form with loaded on board panel visible
        {
            _args[1] = "ReadOnly";
            _args[2] = "mark_";
            break;
        }

        case "cmdMove":     //open move container form with move container panel visible
        {
            _args[1] = "ReadOnly";
            _args[2] = "move_";
            break;
        }

        default:
        {
            break;
        }
        }
        //end switch

        //open container form
        _url = string.Format("../shipment_containers/{2}container.aspx?pid={0}&mode={1}", _args);
        //can't use response, error= input string not in correct format as can't utilise response during callback
        //Response.Redirect(_url, true);
        DevExpress.Web.ASPxClasses.ASPxWebControl.RedirectOnCallback(_url);
    }
Ejemplo n.º 9
0
    protected void ASPxGridView2_CustomButtonCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonCallbackEventArgs e)
    {
        bool move      = e.ButtonID == "sy" ? true : false;
        int  PROCESSID = Convert.ToInt32(ASPxGridView2.GetRowValues(e.VisibleIndex, "PROCESSID"));

        GhtnTech.SEP.OraclDAL.DALPROCESS pro = new GhtnTech.SEP.OraclDAL.DALPROCESS();
        DataTable dt         = pro.GetDALPROCESS(" and PROCESSID=" + PROCESSID.ToString()).Tables[0];
        int       sort       = Convert.ToInt32(dt.Rows[0]["SERIALNUMBER"]);
        int       WORKTASKID = Convert.ToInt32(dt.Rows[0]["WORKTASKID"]);

        try
        {
            //修改后-删除某记录后也可进行排序
            DataSet ds = OracleHelper.Query("select SERIALNUMBER from (select SERIALNUMBER from PROCESS where WORKTASKID='" + WORKTASKID + "' order by SERIALNUMBER desc nulls last) where ROWNUM = 1");
            for (int i = 1; i <= int.Parse(ds.Tables[0].Rows[0]["SERIALNUMBER"].ToString()); i++)
            {
                int otherID = -1;
                try
                {
                    DataSet dsP = pro.GetDALPROCESS(" and WORKTASKID = " + WORKTASKID.ToString() + " and SERIALNUMBER = " + Convert.ToString(move ? sort - i : sort + i));
                    otherID = Convert.ToInt32(dsP.Tables[0].Rows[0]["PROCESSID"].ToString());
                }
                catch
                {
                    continue;
                }
                pro.UpdateDALPROCESS_SERIALNUMBER(PROCESSID, move ? sort - i : sort + i);
                pro.UpdateDALPROCESS_SERIALNUMBER(otherID, sort);
                break;
            }
            ObjectDataSource1.SelectParameters["strWhere"].DefaultValue = "and WORKTASKID = " + WORKTASKID + "";
            ASPxGridView2.DataSourceID = "ObjectDataSource1";
            ASPxGridView2.DataBind();

            //连号方可排序
            //int otherID = Convert.ToInt32(pro.GetDALPROCESS(" and WORKTASKID=" + WORKTASKID.ToString() + " and SERIALNUMBER=" + Convert.ToString(move ? sort - 1 : sort + 1)).Tables[0].Rows[0]["PROCESSID"]);
            //pro.UpdateDALPROCESS_SERIALNUMBER(PROCESSID, move ? sort - 1 : sort + 1);
            //pro.UpdateDALPROCESS_SERIALNUMBER(otherID, sort);

            //ObjectDataSource1.SelectParameters["strWhere"].DefaultValue = "and WORKTASKID = " + WORKTASKID + "";
            //ASPxGridView2.DataSourceID = "ObjectDataSource1";
            //ASPxGridView2.DataBind();
        }
        catch
        {
            string msg = move ? "当前是第一行,无法上移" : "当前是最后一行,无法下移";
            throw new Exception(msg);
        }
    }
Ejemplo n.º 10
0
    protected void dxgridVoyage_CustomButtonCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonCallbackEventArgs e)
    {
        ASPxGridView _grid = (ASPxGridView)sender;
        string       _url  = "";
        string       _path = "{2}\\{3}.aspx?pid={0}&mode={1}";

        string[] _args = { "", "", "", "", "" };
        //primary key number get VoyageID
        _args[0] = wwi_security.EncryptString(_grid.GetRowValues(e.VisibleIndex, _grid.KeyFieldName).ToString(), "publiship");

        switch (e.ButtonID.ToString())
        {
        case "cmdView":     //open container form in readonly mode
        {
            _args[1] = "ReadOnly";
            _args[2] = "";
            break;
        }

        case "cmdEdit":     //open container form in edit mode
        {
            _args[1] = "Edit";
            _args[2] = "";
            break;
        }

        default:
        {
            break;
        }
        }
        //end switch

        //get folder form is in
        _args[2] = System.IO.Path.GetDirectoryName(Page.AppRelativeVirtualPath);
        //change to formview page by removing 'search' e.g. container_search.aspx becomes container.aspx
        _args[3] = System.IO.Path.GetFileNameWithoutExtension(Page.AppRelativeVirtualPath).Replace("_search", "");
        //full path to page including params

        _url = string.Format(_path, _args);
        //can't use response, error= input string not in correct format as can't utilise response during callback
        //Response.Redirect(_url, true);

        DevExpress.Web.ASPxClasses.ASPxWebControl.RedirectOnCallback(_url);
    }
Ejemplo n.º 11
0
    /// <summary>
    /// custom command buttons view/edit/delete (maybe?)/create order
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void dxgridOrders_CustomButtonCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonCallbackEventArgs e)
    {
        ASPxGridView _grid = (ASPxGridView)sender;

        //get order number off grid
        string[] _fields = { "OrderTemplateID" };
        //pass order no as encryped data
        string _id = wwi_security.EncryptString(_grid.GetRowValues(e.VisibleIndex, _fields).ToString(), "publiship");
        //track requesting page so we can return to it
        //string _req = this.dxhfSearch.Get("req").ToString(); //populated on page load   //wwi_security.EncryptString("Search", "publiship");

        //page to redirect build as required
        string _page = "";

        //pass templateid as primary key id 'pid'
        switch (e.ButtonID.ToString())
        {
        case "cmdView":     //redirect to order_view.aspx
        {
            _page = string.Format("../system_templates/order_template.aspx?pid={0}&mode={1}", _id, "ReadOnly");
            DevExpress.Web.ASPxClasses.ASPxWebControl.RedirectOnCallback(_page);          //Response.Redirect(_page);
            break;
        }

        case "cmdEdit":     //redirect to order_edit.aspx
        {
            _page = string.Format("../system_templates/order_template.aspx?pid={0}&mode={1}", _id, "Edit");
            DevExpress.Web.ASPxClasses.ASPxWebControl.RedirectOnCallback(_page);         //Response.Redirect(_page);
            break;
        }

        case "cmdCreateOrder":     //use template to create on order
        {
            _page = string.Format("../system_templates/order_template.aspx?pid={0}&mode={1}", _id, "ReadOnly");
            DevExpress.Web.ASPxClasses.ASPxWebControl.RedirectOnCallback(_page);         //Response.Redirect(_page);
            break;
        }

        default:
        {
            break;
        }
        }//end switch
    }
Ejemplo n.º 12
0
        protected void ASPxGridView1_CustomButtonCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonCallbackEventArgs e)
        {
            if (e.ButtonID != "btnCusPrintDT")
            {
                return;
            }
            ASPxGridView grid = sender as ASPxGridView;
            //Lấy thông tin mã kỳ thi
            int kthiid = (int)grid.GetRowValues(e.VisibleIndex, "MAKYTHI");
            //Từ mã kỳ thi xác định các đề thi và in ra file doc
            ArrayList dsdethi = dethiBus.GetMadtFromKythi(kthiid);

            //Tạo arraylist đề thi
            foreach (DETHI item in dsdethi)
            {
                chBus = new CauHoiBUS();
                ArrayList dsch = chBus.GetDSCauHoiDT(item.MADETHI);
            }
        }
Ejemplo n.º 13
0
    /// <summary>
    /// this event is not being used, we are using client side asynchronous callbacks and webmethod get_secure_url so we can open page in new window
    /// custom command buttons vierw/edit/delete (maybe?)
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void dxgridOrders_CustomButtonCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonCallbackEventArgs e)
    {
        ASPxGridView _grid = (ASPxGridView)sender;
        //get order number off grid
        //string[] _fields = { "OrderNumber", "OrderID" };
        //pass order no, id as encryped data
        string _orderno = wwi_security.EncryptString(_grid.GetRowValues(e.VisibleIndex, "OrderNumber").ToString(), "publiship");
        string _orderid = wwi_security.EncryptString(_grid.GetRowValues(e.VisibleIndex, "OrderID").ToString(), "publiship");

        //track requesting page so we can return to it
        string _req = this.dxhfOrder.Get("req").ToString(); //populated on page load   //wwi_security.EncryptString("Search", "publiship");

        //page to redirect build as required
        string _page = "";

        switch (e.ButtonID.ToString())
        {
        case "cmdView":
        {
            //send orderid and orderno as related tables are linked by orderno not orderid
            _page = string.Format("../shipment_orders/order.aspx?mode={0}&pid={1}&req={2}&pno={3}", "ReadOnly", _orderid, _req, _orderno);
            DevExpress.Web.ASPxClasses.ASPxWebControl.RedirectOnCallback(_page);          //Response.Redirect(_page);
            break;
        }

        case "cmdEdit":
        {
            //send orderid and orderno as related tables are linked by orderno not orderid
            _page = string.Format("../shipment_orders/order.aspx?mode={0}&pid={1}&req={2}&pno={3}", "Edit", _orderid, _req, _orderno);
            DevExpress.Web.ASPxClasses.ASPxWebControl.RedirectOnCallback(_page);         //Response.Redirect(_page);
            break;
        }

        case "cmdViewFilter":     //deprecated we no longer use seperate order_view.aspx so just use cmdView
        {
            _page = string.Format("../shipment_orders/order_view.aspx?mode={0}&pid={1}&req={2}", "ReadOnly", _orderid, _req);
            DevExpress.Web.ASPxClasses.ASPxWebControl.RedirectOnCallback(_page);         //Response.Redirect(_page);
            break;
        }

        case "cmdEditFilter":     //deprecated
        {
            _page = string.Format("../shipment_orders/order_edit.aspx?mode={0}&pid={1}&req={2}", "Edit", _orderid, _req);
            DevExpress.Web.ASPxClasses.ASPxWebControl.RedirectOnCallback(_page);         //Response.Redirect(_page);
            break;
        }

        case "cmdOrderSheet":     //order sheet
        {
            _page = string.Format("../shipment_orders/order_sheet.aspx?pno={0}", _orderno);
            //DevExpress.Web.ASPxClasses.ASPxWebControl.RedirectOnCallback(_page); //Response.Redirect(_page);
            //**** this code does not work
            //string _err = itextsharp_out.advance_labels(120600005);
            //_page = string.Format("~/Order_View.aspx?pno={0}", _orderno);
            //DevExpress.Web.ASPxClasses.ASPxWebControl.RedirectOnCallback(_page);  //Response.Redirect(_page);
            //****
            //string _err = itextsharp_out.order_sheet(wwi_func.vint(_orderno));
            //if (_err != "") {
            //    this.dxlblErr.Text = _err;
            //    this.dxpnlErr.Visible = true; }
            break;
        }

        case "cmdTemplate":     //make template out of selected order
        {
            _page = string.Format("../system_templates/order_template.aspx?pid={0}&mode={1}", _orderid, "Insert");
            DevExpress.Web.ASPxClasses.ASPxWebControl.RedirectOnCallback(_page);         //Response.Redirect(_page);
            break;
        }

        case "cmdClone":     //make identical copy of selected order
        {
            _page = string.Format("../shipment_orders/clone_order.aspx?pid={0}&pno={1}", _orderid, _orderno);
            DevExpress.Web.ASPxClasses.ASPxWebControl.RedirectOnCallback(_page);         //Response.Redirect(_page);
            break;
        }

        default:
        {
            break;
        }
        }//end switch
    }
Ejemplo n.º 14
0
 protected void gvLihatPanjar_CustomButtonCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonCallbackEventArgs e)
 {
     btnPersetujuanPanjar(e.VisibleIndex);
 }
Ejemplo n.º 15
0
 protected void gvPersetujuan_CustomButtonCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonCallbackEventArgs e)
 {
     btnAction(e.VisibleIndex);
     DevExpress.Web.ASPxClasses.ASPxWebControl.RedirectOnCallback(@"~\Kemitraan\RealisasiPersetujuanTambah.aspx");
 }
Ejemplo n.º 16
0
 protected void gvPenyaluran_CustomButtonCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonCallbackEventArgs e)
 {
     btnCheckListAction(e.VisibleIndex);
 }