Example #1
0
 protected void cpGetPrecioMaterial_Callback(object sender, DevExpress.Web.CallbackEventArgsBase e)
 {
     using (var ut = new UnidadDeTrabajo())
     {
         cpGetPrecioMaterial.JSProperties["cpStockM"] = ut.Material.ObtenerPrecioMaterial_X_Requerimiento(int.Parse(e.Parameter.ToString().Split('|')[0]), int.Parse(e.Parameter.ToString().Split('|')[1])).ToString();
     }
 }
Example #2
0
        protected void cbpInfo_Callback(object sender, DevExpress.Web.CallbackEventArgsBase e)
        {
            switch (e.Parameter)
            {
            case "refresh": BindGrid(); break;

            case "ccbNhaCungCapChanged":
                listReceiptProducts = new List <oImportProduct_TraHangNCC>();
                BindGrid();
                ListSoPhieu();
                break;

            case "ccbSoPhieuChanged":
                listReceiptProducts = new List <oImportProduct_TraHangNCC>();
                ListSoPhieu();
                int PhieuGiaoHangID     = int.Parse(ccbSoPhieu.Value.ToString());
                var ListGiaoHangChiTiet = DBDataProvider.ListChiTietGiaoHang(PhieuGiaoHangID);
                foreach (var prod in ListGiaoHangChiTiet)
                {
                    Insert_Hang(Convert.ToInt32(prod.HangHoaID));
                }
                BindGrid();
                break;

            default: break;
            }
        }
Example #3
0
        protected void CallbackPanel_Callback(object sender, DevExpress.Web.CallbackEventArgsBase e)
        {
            string[] split = e.Parameter.Split(';');

            if (split[0] == "UserAction")
            {
                object position  = ASPxGridViewIssueDocumentPosition.GetRowValues(ASPxGridViewIssueDocumentPosition.FocusedRowIndex, "IssueDocumentPositionID");
                bool   openPopup = SetSessionsAndOpenPopUp(split[1], Enums.IssueDocumentSession.IssueDocumentPositionID, position);
                AddValueToSession(Enums.IssueDocumentSession.IssueDocumentID, issueDocumentID);

                if (userAction == (int)Enums.UserAction.Add)
                {
                    AddOrEditEntityObject(true);
                    AddValueToSession(Enums.CommonSession.OpenPopupAfterRefresh, true);
                    ASPxWebControl.RedirectOnCallback(GenerateURI("IssueDocumentForm.aspx", (int)Enums.UserAction.Edit, issueDocumentID));
                }
                else
                {
                    if (openPopup)
                    {
                        PopupControlIssueDocumentPos.ShowOnPageLoad = true;
                    }
                }
            }
        }
Example #4
0
 protected void callbackpanelAdd_Callback(object sender, DevExpress.Web.CallbackEventArgsBase e)
 {
     try
     {
         using (var connection = new OracleConnection(ConfigurationManager.ConnectionStrings["DBConnection"].ConnectionString))
         {
             connection.Open();
             string query = "INSERT INTO TABLEMERGEPDF (TITLE, FILEATTACHMENT, FILENAME) VALUES (:TITLE, :FILEATTACHMENT, :FILENAME)";
             using (var cmd = new OracleCommand(query, connection))
             {
                 cmd.Parameters.Add("TITLE", OracleDbType.NVarchar2).Value     = textboxTitle.Text;
                 cmd.Parameters.Add("FILEATTACHMENT", OracleDbType.Blob).Value = Session["FILE"];
                 cmd.Parameters.Add("FILENAME", OracleDbType.NVarchar2).Value  = Session["FILENAME"];
                 cmd.ExecuteNonQuery();
             }
             ASPxEdit.ClearEditorsInContainer(callbackpanelAdd);
             labelMessage.Text    = "Successfull added!";
             labelMessage.Visible = true;
         }
     }
     catch (OracleException ex)
     {
         labelMessage.Text    = ex.Message;
         labelMessage.Visible = true;
     }
 }
Example #5
0
        protected void xcpProducts_Callback(object sender, DevExpress.Web.CallbackEventArgsBase e)
        {
            string cats = "";
            string c1   = "";
            string c2   = "";

            if (e.Parameter == "Update")
            {
                cats = dekkpro.updateProducts(false);
                // loadProducts(true);
            }

            if (cats != "")
            {
                c1 = cats.Split('|')[0];
                c2 = cats.Split('|')[1];
            }

            xcpProducts.JSProperties.Add("cpC1", c1);
            xcpProducts.JSProperties.Add("cpC2", c2);

            loadProducts(true);
            xgvProducts.DataSource = Session["dsProducts"];
            xgvProducts.DataBind();
        }
Example #6
0
 protected void ASPxCallbackPanel1_Callback(object sender, DevExpress.Web.CallbackEventArgsBase e)
 {
     if (Request.QueryString["Server"] != "" && Request.QueryString["Server"] != null)
     {
         SetGridFromQString(Request.QueryString["Server"]);
         lblServerName.Text = Request.QueryString["Server"];
         SetGraph(lblServerName.Text);
     }
     else
     {
         //lblServerName.Text = "";
         int index = DiskHealthGrid.FocusedRowIndex;
         //8/9/2013 NS modified - when no rows were found, object reference not set error appeared
         if (index > -1)
         {
             //3/2/2015 NS commented out
             //webChartDiskHealth.Visible = true;
             string value = DiskHealthGrid.GetRowValues(index, "ServerName").ToString();
             lblServerName.Text = value;
             SetGraph(value);
         }
         else
         {
             webChartDiskHealth.Visible = false;
         }
     }
 }
 protected void ASPxCallbackPanel1_Callback(object sender, DevExpress.Web.CallbackEventArgsBase e)
 {
     if (!ValidarConexionYUsuarioLogueado(sender))
     {
         return;
     }
     GetTagsBySku(e.Parameter);
 }
Example #8
0
 protected void panelKolektabilitas_Callback(object source, DevExpress.Web.CallbackEventArgsBase e)
 {
     if (e.Parameter.StartsWith("r:"))
     {
         gridbind_kolek(e.Parameter.Substring(2));
         IDIKREDIT_ID.Value = e.Parameter.Substring(2);
     }
 }
Example #9
0
 protected void PanelComment_Callback(object source, DevExpress.Web.CallbackEventArgsBase e)
 {
     try
     {
         if (e.Parameter == "r")
         {
             btn_confirm.Attributes["onclick"] = "callback(PanelComment,'reject')";
         }
         else if (e.Parameter == "v")
         {
             btn_confirm.Attributes["onclick"] = "callback(PanelComment,'reverse')";
         }
         else if (e.Parameter == "a")
         {
             btn_confirm.Attributes["onclick"] = "callback(PanelComment,'approve')";
         }
         else if (e.Parameter == "reject")
         {
             string   sql = "exec sp_update_request @1,@2,@3,@4,@5,@6";
             object[] par = new object[] { requestid.Text, "GCC", "RJC", "RJC", Session["UserID"], comment.Text };
             conn.ExecNonQuery(sql, par, dbtimeout);
             PanelComment.JSProperties["cp_alert"]    = "Data permintaan SLIK checking direject.";
             PanelComment.JSProperties["cp_target"]   = "_parent";
             PanelComment.JSProperties["cp_redirect"] = "../ScreenMenu.aspx?sm=BIC|GCC&passurl&mntitle=Approval SLIK Checking&li=L|BIC|GCC";
         }
         else if (e.Parameter == "reverse")
         {
             string   sql = "exec sp_update_request @1,@2,@3,@4,@5,@6";
             object[] par = new object[] { requestid.Text, "GCC", "DRF", "RVS", Session["UserID"], comment.Text };
             conn.ExecNonQuery(sql, par, dbtimeout);
             PanelComment.JSProperties["cp_alert"]    = "Data permintaan SLIK checking direverse.";
             PanelComment.JSProperties["cp_target"]   = "_parent";
             PanelComment.JSProperties["cp_redirect"] = "../ScreenMenu.aspx?sm=BIC|GCC&passurl&mntitle=Approval SLIK Checking&li=L|BIC|GCC";
         }
         else if (e.Parameter == "approve")
         {
             string   sql = "exec sp_update_request @1,@2,@3,@4,@5,@6";
             object[] par = new object[] { requestid.Text, "GCC", "APV", "APV", Session["UserID"], comment.Text };
             conn.ExecNonQuery(sql, par, dbtimeout);
             PanelComment.JSProperties["cp_alert"]    = "Data permintaan SLIK checking diapprove.";
             PanelComment.JSProperties["cp_target"]   = "_parent";
             PanelComment.JSProperties["cp_redirect"] = "../ScreenMenu.aspx?sm=BIC|GCC&passurl&mntitle=Approval SLIK Checking&li=L|BIC|GCC";
         }
     }
     catch (Exception ex)
     {
         string errmsg = "";
         if (ex.Message.IndexOf("Last Query:") > 0)
         {
             errmsg = ex.Message.Substring(0, ex.Message.IndexOf("Last Query:"));
         }
         else
         {
             errmsg = ex.Message;
         }
         PanelComment.JSProperties["cp_alert"] = errmsg;
     }
 }
Example #10
0
        protected void cpLODetail_Callback(object sender, DevExpress.Web.CallbackEventArgsBase e)
        {
            string[] param          = e.Parameter.Split('|');
            Int64    itemID         = Convert.ToInt64(param[0]);
            string   itemDesc       = param[1];
            string   tbbmName       = param[2];
            string   spshName       = param[3];
            int      quantityVolume = Convert.ToInt32(param[4]);
            Int64    sppb_ID        = Convert.ToInt64(param[5]);

            lblItemDesc.Text = itemDesc;
            lblTBBMName.Text = tbbmName;
            lblSPSHName.Text = spshName;
            hf["qty"]        = quantityVolume;
            hf["itemID"]     = itemID;

            LOModel.LO loDetail = LOEntity.GetLODetail(sppb_ID);

            cmbTransporter.DataSource = liTransporter;
            cmbTransporter.DataBind();

            if (loDetail != null)
            {
                if (loDetail.Transporter_ID != 0)
                {
                    cmbTransporter.Value = loDetail.Transporter_ID;

                    if (loDetail.Type_ID != 0)
                    {
                        cmbVehicleType.ClientEnabled = true;
                        cmbVehicleType.DataSource    = liVehicleType.Where(x => x.Transporter_ID == loDetail.Transporter_ID).GroupBy(x => new { x.Type_ID, x.VehicleType }).Select(x => x.First()).Distinct().ToList();
                        cmbVehicleType.DataBind();

                        cmbVehicleType.Value = loDetail.Type_ID;

                        if (loDetail.Vehicle_ID != 0)
                        {
                            cmbVehicleNumber.ClientEnabled = true;
                            cmbVehicleNumber.DataSource    = liVehicleNumber.Where(x => x.Transporter_ID == loDetail.Transporter_ID && x.Type_ID == loDetail.Type_ID).ToList();
                            cmbVehicleNumber.DataBind();

                            cmbVehicleNumber.Value = loDetail.Vehicle_ID;
                        }
                    }

                    if (loDetail.Driver_ID != 0)
                    {
                        cmbDriver.ClientEnabled = true;
                        cmbDriver.DataSource    = liDriver.Where(x => x.Transporter_ID == loDetail.Transporter_ID).ToList();
                        cmbDriver.DataBind();

                        cmbDriver.Value = loDetail.Driver_ID;
                    }
                }
            }

            cpLODetail.ClientVisible = true;
        }
Example #11
0
        protected void PanelFile_Callback(object source, DevExpress.Web.CallbackEventArgsBase e)
        {
            string fullpath = Session["UploadRestoreData"].ToString();

            excelToDb(fullpath);

            try { File.Delete(fullpath); }
            catch { }
        }
Example #12
0
    protected void callbackPanel_Callback(object source, DevExpress.Web.CallbackEventArgsBase e)
    {
        SQL_utils sql  = new SQL_utils("data");
        string    html = sql.StringScalar_from_SQLstring("select projSummary from dp.DataProject where dataproj_pk=" + e.Parameter.ToString());


        litText.Text = html;
        sql.Close();
    }
        protected void cbpInfo_Callback(object sender, DevExpress.Web.CallbackEventArgsBase e)
        {
            switch (e.Parameter)
            {
            case "refresh": BindGrid(); break;

            default: break;
            }
        }
Example #14
0
        protected void collback_Callback(object sender, DevExpress.Web.CallbackEventArgsBase e)
        {
            switch (e.Parameter.Split('|')[0])
            {
            case "GuardarDetalle": var clienteDetalle = new ClienteDetalle();
                clienteDetalle.CUSTOMER   = int.Parse(Session["CodigoClienteScounting"].ToString());
                clienteDetalle.SALE_ROUTE = UiListaRuta.Value?.ToString() ?? "";

                clienteDetalle.REFERENCE_CBC  = UiListaCheckRefereciaCVC.Items[0].Selected ? "L" : "";
                clienteDetalle.REFERENCE_CBC += UiListaCheckRefereciaCVC.Items[1].Selected ? "M" : "";
                clienteDetalle.REFERENCE_CBC += UiListaCheckRefereciaCVC.Items[2].Selected ? "R" : "";
                clienteDetalle.REFERENCE_CBC += UiListaCheckRefereciaCVC.Items[3].Selected ? "J" : "";
                clienteDetalle.REFERENCE_CBC += UiListaCheckRefereciaCVC.Items[4].Selected ? "V" : "";

                clienteDetalle.VISIT_DAY  = UiListaCheckDiaVisita.Items[0].Selected ? "L" : "";
                clienteDetalle.VISIT_DAY += UiListaCheckDiaVisita.Items[1].Selected ? "M" : "";
                clienteDetalle.VISIT_DAY += UiListaCheckDiaVisita.Items[2].Selected ? "R" : "";
                clienteDetalle.VISIT_DAY += UiListaCheckDiaVisita.Items[3].Selected ? "J" : "";
                clienteDetalle.VISIT_DAY += UiListaCheckDiaVisita.Items[4].Selected ? "V" : "";

                clienteDetalle.VISIT_FRECUENCY  = UiListaCheckFrecuenciaVisita.Items[0].Selected ? "L" : "";
                clienteDetalle.VISIT_FRECUENCY += UiListaCheckFrecuenciaVisita.Items[1].Selected ? "M" : "";
                clienteDetalle.VISIT_FRECUENCY += UiListaCheckFrecuenciaVisita.Items[2].Selected ? "R" : "";
                clienteDetalle.VISIT_FRECUENCY += UiListaCheckFrecuenciaVisita.Items[3].Selected ? "J" : "";
                clienteDetalle.VISIT_FRECUENCY += UiListaCheckFrecuenciaVisita.Items[4].Selected ? "V" : "";

                clienteDetalle.TIME_DELIVER_DAYS = Int16.Parse(UiSpinTiempoEntrega.Value.ToString());
                clienteDetalle.BRANCH            = UiTextoRamo.Text;
                clienteDetalle.SERVICE_WINDOW    = UiTextoVentaServicio.Text;
                clienteDetalle.SALE_POINT_COMPLEMENT_DIRECTION = UiDireccionPuntoVenta.Text;
                clienteDetalle.INVOICE_ADRESS_COMPLEMENT       = UiDireccionFacturacion.Text;
                clienteDetalle.DEPARTMENT                 = UiListaDepartamentos.Value?.ToString() ?? "";
                clienteDetalle.MUNICIPALITY               = UiListaMunicipio.Value?.ToString() ?? "";
                clienteDetalle.CREDIT_LIMIT               = UiSpinLimiteCredito.Number;
                clienteDetalle.CODE_BUSINESS_GYRE         = UiTextoCodigoGiroNegocio.Text;
                clienteDetalle.BUSINESS_GYRE_DENOMINATION = UiTextoDenominacionGiroNegocio.Text;
                clienteDetalle.CREDIT_CONTROL_AREA        = UiTextoAreaControlNegocio.Text;
                clienteDetalle.FORM_PAY_AUTHORIZATION     = UiTextoFormaPagoAutorizada.Text;
                clienteDetalle.CURRENCY = UiListaMoneda.Value?.ToString() ?? "";
                clienteDetalle.ASSOCIATED_ACCOUNTANT_CREDIT_COUNT = UiTextoCuentaContableCreditoAsociada.Text;
                clienteDetalle.PAY_CONDITION   = UiListaCondicionPago.Value?.ToString() ?? "";
                clienteDetalle.CREDIT_BLOCKADE = UiCheckBloqueoCredito.Checked ? "1":"0";
                clienteDetalle.LAST_UPDATED_BY = Session["USER"].ToString();
                clienteDetalle.COMMENTS        = UiMemoObservaciones.Text;

                UsuarioDesesaGuardarDetalle?.Invoke(sender, new ScoutingArgumento {
                    ClienteDetalle = clienteDetalle
                });
                break;

            case "LimpiarControles":
                LimpiarControles();
                collback.JSProperties.Add("cpCerrarPop", "Enabled");
                break;
            }
        }
Example #15
0
        protected void cbpInfoStep_Callback(object sender, DevExpress.Web.CallbackEventArgsBase e)
        {
            string[] Para = e.Parameter.Split('-');
            switch (Para[0])
            {
            case "1": HanMucCongNo(Para[1]); break;

            case "2": PhieuDenHang(Para[1]); break;
            }
        }
Example #16
0
        protected void ASPxCallbackPanel1_Callback(object sender, DevExpress.Web.CallbackEventArgsBase e)
        {
            string[] parameters = e.Parameter.Split('|');
            int      pageIndex  = Convert.ToInt32(parameters[0]);

            if (pageIndex == 1)
            {
                FillReport();
            }
        }
Example #17
0
        protected void dxComboBox_Callback(object source, DevExpress.Web.CallbackEventArgsBase e)
        {
            ASPxComboBox oCtrl = (source as ASPxComboBox);
            DataView     dv    = new DataView(dtparam, "FIELDNM=" + staticFramework.toSql(oCtrl.ID), null, DataViewRowState.OriginalRows);

            if (e.Parameter == "rc")
            {
                reffcascade(oCtrl, dv[0]["FIELDREFF"].ToString());
            }
        }
Example #18
0
    protected void ASPxSpreadsheet1_Callback(object sender, DevExpress.Web.CallbackEventArgsBase e)
    {
        var callbakInfo = e.Parameter;

        if (String.IsNullOrWhiteSpace(callbakInfo))
        {
            return;
        }
        SetupProtection(callbakInfo);
    }
Example #19
0
        protected void cbpInfo_left_Callback(object sender, DevExpress.Web.CallbackEventArgsBase e)
        {
            string[] para = e.Parameter.Split('|');
            switch (para[0])
            {
            case "ccbBangGiaSelectChange": hiddenfile["IDBangGia"] = ccbBangGia.Value.ToString();  ThongTinBangGia(); break;

            default: break;
            }
        }
Example #20
0
 protected void CallbackPanel_Callback(object sender, DevExpress.Web.CallbackEventArgsBase e)
 {
     if ((bool)CaptchaRadioButtonList.Value)
     {
         AddSuccessControlsInPanel(sender);
     }
     else
     {
         AddFailureControlsInPanel(sender);
     }
 }
Example #21
0
        protected void cbpInfo_Callback(object sender, DevExpress.Web.CallbackEventArgsBase e)
        {
            switch (e.Parameter)
            {
            case "refresh": LoadLeft(); break;

            case "resetinfo": Reset(); break;

            default: break;
            }
        }
Example #22
0
 protected void PanelSID_Callback(object source, DevExpress.Web.CallbackEventArgsBase e)
 {
     if (e.Parameter.StartsWith("r:"))
     {
         retrieve_data_suppl(e.Parameter.Substring(2));
     }
     else if (e.Parameter.StartsWith("s:"))
     {
         savedata_suppl();
         gridbind_suppl();
     }
 }
Example #23
0
        public void ProcessCallback(object sender, DevExpress.Web.CallbackEventArgsBase e)
        {
            String param        = String.Concat(e.Parameter);
            String propertyName = PropertyName;

            DetermineCallbackParams(e.Parameter, ref propertyName, ref param);

            if (PropertyName == propertyName)
            {
                OnCallback(new CallbackEventArgsBase(param));
            }
        }
        protected void cbpThemHH_Callback(object sender, DevExpress.Web.CallbackEventArgsBase e)
        {
            switch (e.Parameter)
            {
            case "Save":
                Save();
                ResetAddProductPanel();
                break;

            case "Renew": ResetAddProductPanel(); break;
            }
        }
Example #25
0
        protected void PanelSID_Callback(object source, DevExpress.Web.CallbackEventArgsBase e)
        {
            staticFramework.reff(status_app, "select * FROM rfrelationbic where cust_type = @1",
                                 new object[] { cust_type.SelectedValue }, conn);
            if (e.Parameter.StartsWith("r:"))
            {
                retrieve_data_suppl(e.Parameter.Substring(2));
            }
            else if (e.Parameter.StartsWith("s:"))
            {
                savedata_suppl();
                gridbind_suppl();
            }
            else if (e.Parameter.StartsWith("gp:"))
            {
                string    key = e.Parameter.Substring(3);
                DataTable dt  = conn.GetDataTable("select * from vw_apprequest_all where requestid = @1", new object[] { key }, dbtimeout);
                if (dt.Rows.Count == 0)
                {
                    dt = conn.GetDataTable("select * from vw_whitelist_all where whitelistid = @1", new object[] { key }, dbtimeout);
                }

                supp_cust_name.Text          = dt.Rows[0]["cust_name"].ToString();
                supp_ktp.Text                = dt.Rows[0]["ktp"].ToString();
                supp_npwp.Text               = dt.Rows[0]["npwp"].ToString();
                supp_cust_type.SelectedValue = dt.Rows[0]["cust_type"].ToString();
                supp_pob.Text                = dt.Rows[0]["pob"].ToString();
                supp_homeaddress.Text        = dt.Rows[0]["homeaddress"].ToString();
                supp_phonenumber.Text        = dt.Rows[0]["phonenumber"].ToString();
                supp_dob.Value               = dt.Rows[0]["dob"];
                try
                {
                    supp_gender.SelectedValue = dt.Rows[0]["gender"].ToString();
                }
                catch (Exception) { }
                supp_mother_name.Text = dt.Rows[0]["mother_name"].ToString();
                if (supp_cust_type.SelectedValue == "PSH")
                {
                    tr_supp_gender.Style["display"]      = "none";
                    tr_supp_mother_name.Style["display"] = "none";
                    supp_npwp.CssClass   = "mandatory";
                    supp_gender.CssClass = "";
                }
                else
                {
                    tr_supp_gender.Style["display"]      = "";
                    tr_supp_mother_name.Style["display"] = "";
                    supp_npwp.CssClass   = "";
                    supp_gender.CssClass = "mandatory";
                }
            }
        }
        protected void ASPxCallbackPanel1_Callback(object sender, DevExpress.Web.CallbackEventArgsBase e)
        {
            var str = e.Parameter.Substring(0, 1);

            if (str == "#")
            {
                DeleteTagByBatch(e.Parameter);
            }
            else
            {
                GetTagsByBatch(e.Parameter);
            }
        }
Example #27
0
 protected void ASPxCallbackPanel1_Callback(object sender, DevExpress.Web.CallbackEventArgsBase e)
 {
     if (!ValidarConexionYUsuarioLogueado(sender))
     {
         return;
     }
     switch (e.Parameter.Split('|')[0])
     {
     case "MostrarFoto":
         MostrarFotos(e.Parameter.Split('|')[1]);
         break;
     }
 }
        protected void CbpanelGrids_Callback(object sender, DevExpress.Web.CallbackEventArgsBase e)
        {
            switch (e.Parameter)
            {
            case "btnSend":
                SendData();
                break;

            case "btnReturn":
                ReturnData();
                break;
            }
        }
Example #29
0
 protected void cbpInfo_Callback(object sender, DevExpress.Web.CallbackEventArgsBase e)
 {
     switch (e.Parameter)
     {
         case "refresh": LamMoi(); break;
         case "giamgia": GiamGia(); break;
         case "renew": spTienGiamGia.Number = 0; break;
         case "khachhang": CongNo();  hiddenFields["IDKhachHang"] = ccbNhaCungCap.Value.ToString(); break;
         case "khachthanhtoan": KhachThanhToan(); break;
         case "lammoi": Reset(); break;
         default: break;
     }
 }
 protected void UIListaTipoDocumento_Callback(object sender, DevExpress.Web.CallbackEventArgsBase e)
 {
     switch (e.Parameter.Split('|')[0])
     {
     case "LlenarListaTipoDocumento":
         UsuarioDeseaObtenerClasificaciones?.Invoke(UiVistaSecuenciaDocumentos, new SecuenciaDocumentosArgumento {
             DataClasificacion = new Clasificacion {
                 GROUP_CLASSIFICATION = "DOC_TYPE"
             }
         });
         break;
     }
 }