コード例 #1
0
        protected void btExcluir_Click(object sender, EventArgs e)
        {
            int  opcao  = Convert.ToInt32(DropDownList1.SelectedItem.Value);
            int  filial = Convert.ToInt32(DropDownList2.SelectedItem.Value);
            long numped = string.IsNullOrEmpty(TextBoxNumero.Text) ? 0 : Convert.ToInt64(TextBoxNumero.Text);

            ServiceReference2.WebService1SoapClient nn = new ServiceReference2.WebService1SoapClient();
            if (opcao == 2 && filial != 0 && numped < 999998)
            {
                nn.ExcluirPedidoDoPainel(opcao, numped, filial);
                String mensagem = "Pedido da NFC-e de N. " + numped + " excluido do painel!";
                ClientScript.RegisterClientScriptBlock(this.GetType(), "MensagemDeAlert", "alert('" + mensagem + "');", true);
                TextBoxNumero.Text = "";
            }
            else if (opcao == 3 && filial != 0 && numped > 99999)
            {
                nn.ExcluirPedidoDoPainel(opcao, numped, filial);
                String mensagem = "Pedido " + numped + " excluido do painel!";
                ClientScript.RegisterClientScriptBlock(this.GetType(), "MensagemDeAlert", "alert('" + mensagem + "');", true);
                TextBoxNumero.Text = "";
            }
            else
            {
                String mensagem = "Não foi possível excluido do painel verificar as informações!";
                ClientScript.RegisterClientScriptBlock(this.GetType(), "MensagemDeAlert", "alert('" + mensagem + "');", true);
            }
        }
コード例 #2
0
        protected void btPrioridade_Click(object sender, EventArgs e)
        {
            int  opcao  = Convert.ToInt32(DropDownList1.SelectedItem.Value);
            int  filial = Convert.ToInt32(DropDownList2.SelectedItem.Value);
            long numped = string.IsNullOrEmpty(TextBoxNumero.Text) ? 0 : Convert.ToInt64(TextBoxNumero.Text);

            ServiceReference2.WebService1SoapClient nn = new ServiceReference2.WebService1SoapClient();

            long numero    = string.IsNullOrEmpty(TextBoxNumero.Text) ? 0 : Convert.ToInt64(TextBoxNumero.Text);
            int  condVenda = nn.ValidaEnvioPedidoPainel(opcao, numero, filial).CondVenda;
            int  botao     = 2;

            if (opcao == 2 && filial != 0 && numped < 999998 && condVenda == 8)
            {
                nn.EnviaPedidoParaPainel(opcao, numped, filial, botao);
                String mensagem = "Pedido da NFC-e de N. " + numped + " enviado pra o painel!";
                ClientScript.RegisterClientScriptBlock(this.GetType(), "MensagemDeAlert", "alert('" + mensagem + "');", true);
                TextBoxNumero.Text = "";
            }
            else if (opcao == 3 && filial != 0 && numped > 99999 && (condVenda == 8 || condVenda == 1))
            {
                nn.EnviaPedidoParaPainel(opcao, numped, filial, botao);
                String mensagem = "Pedido " + numped + " enviado pra o painel!";
                ClientScript.RegisterClientScriptBlock(this.GetType(), "MensagemDeAlert", "alert('" + mensagem + "');", true);
                TextBoxNumero.Text = "";
            }
            else
            {
                String mensagem = "Não foi possível enviar o pedido favor verificar as informações ou Verifique com a TI!";
                ClientScript.RegisterClientScriptBlock(this.GetType(), "MensagemDeAlert", "alert('" + mensagem + "');", true);
            }
        }
コード例 #3
0
        protected void btConfirmar_Click(object sender, EventArgs e)
        {
            int     codigo      = string.IsNullOrEmpty(TextBoxCodigo.Text) ? 0 : Convert.ToInt32(TextBoxCodigo.Text);
            long    numped      = string.IsNullOrEmpty(TextBoxPedido.Text) ? 0 : Convert.ToInt64(TextBoxPedido.Text);
            int     matricula   = Convert.ToInt32(Request.QueryString["mat"]);
            decimal qt_separada = string.IsNullOrEmpty(TextBoxConferida.Text) ? 0 : Convert.ToDecimal(TextBoxConferida.Text);

            ServiceReference2.WebService1SoapClient nn = new ServiceReference2.WebService1SoapClient();

            decimal quantidadeSep = (qt_separada + nn.SepararProduto(numped, codigo).QtSep);
            decimal qtOrigem      = Convert.ToDecimal(nn.SepararProduto(numped, codigo).Qt);
            int     numSeq        = Convert.ToInt32(nn.SepararProduto(numped, codigo).Seq);

            if (matricula != 0 && numped != 0 && codigo != 0 && qt_separada != 0 && (quantidadeSep <= qtOrigem))
            {
                nn.ConfirmaConferencia(qt_separada, matricula, numped, codigo, numSeq);
                nn.FinalizaConferenciaItem(numped, codigo, numSeq);
                HabilitarDigitação();
                this.AtualizarGrid();
                int qt_Itens_org  = nn.ValidaConferenciaCompleta(numped).QT_Itens_Org;
                int qt_Itens_conf = nn.ValidaConferenciaCompleta(numped).QT_Itens_Conf;
                int qtlinhas      = TotalDeLinhasConferencia(numped);

                if (qtlinhas == 0)
                {
                    InformaDataFimConferencia(qt_Itens_org, qt_Itens_conf);
                }
            }
            else
            {
                String mensagem = "Verifique a quantidade conferida: " + qt_separada;
                ClientScript.RegisterClientScriptBlock(this.GetType(), "MensagemDeAlert", "alert('" + mensagem + "');", true);
                HabilitarDigitação();
            }
        }
コード例 #4
0
        public theWord[] start(string allWords1)
        {
            ServiceReference2.WebService1SoapClient myWebService = new ServiceReference2.WebService1SoapClient("WebService1Soap");
            string allWords2 = myWebService.removeNonWords(allWords1);

            theWord[] theWords1 = getTheSort1(allWords2);
            theWord[] theWords2 = getTheSort2(theWords1);
            return(theWords2);
        }
コード例 #5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     ServiceReference2.WebService1SoapClient nn = new ServiceReference2.WebService1SoapClient();
     this.GridView1.DataSource = nn.ListaPedidosdoAlmoxarifado();
     this.GridView1.DataBind();
     LbPedido.Visible   = false;
     LbCodigo.Visible   = false;
     LbDescicao.Visible = false;
 }
コード例 #6
0
        //
        // GET: /Home/
        public ActionResult Index()
        {
            LoginModel loginM;

            ServiceReference2.WebService1Soap ws = new ServiceReference2.WebService1SoapClient();
            ViewBag.onlineusers = ws.GetOnlineUsers();

            loginM = new LoginModel(User.Identity.Name, Request, Session.SessionID);
            return View(loginM);
        }
コード例 #7
0
        protected void AtualizarGrid()
        {
            long numped = string.IsNullOrEmpty(TextBoxPedido.Text) ? 0 : Convert.ToInt64(TextBoxPedido.Text);

            ServiceReference2.WebService1SoapClient nn = new ServiceReference2.WebService1SoapClient();
            GridView1.DataSource = nn.ListaItensParaConferencia(numped);
            GridView1.DataBind();
            GridView2.DataSource = nn.ListaItensFinalizados(numped);
            GridView2.DataBind();
            LimparCampos();
        }
コード例 #8
0
 protected void HabilitarBotaoPesquisar(long numped)
 {
     ServiceReference2.WebService1SoapClient nn = new ServiceReference2.WebService1SoapClient();
     this.GridView1.DataSource = nn.ListaItensParaConferencia(numped);
     this.GridView1.DataBind();
     this.GridView2.DataSource = nn.ListaItensFinalizados(numped);
     this.GridView2.DataBind();
     this.GridView3.DataSource = nn.ListaDetalhesDoPedido(numped);
     this.GridView3.DataBind();
     HabilitarDigitação();
 }
コード例 #9
0
ファイル: UserModel.cs プロジェクト: nir-z/HaifanetMobile
 public UserModel(string username)
 {
     ServiceReference2.WebService1Soap ws = new ServiceReference2.WebService1SoapClient();
     ds = ws.GetUserDetails(username);
     this.UserName = ds.Tables["UserDetails"].Rows[0][ds.Tables[0].Columns["UserName"].Ordinal].ToString();
     this.Email = ds.Tables["UserDetails"].Rows[0][ds.Tables[0].Columns["UserName"].Ordinal].ToString()+"haifanet.org.il";
     this.FirstName = ds.Tables["UserDetails"].Rows[0][ds.Tables[0].Columns["FirstName"].Ordinal].ToString();
     this.LastName = ds.Tables["UserDetails"].Rows[0][ds.Tables[0].Columns["LastName"].Ordinal].ToString();
     this.SchoolName = ds.Tables["UserDetails"].Rows[0][ds.Tables[0].Columns["SchoolName"].Ordinal].ToString();
     this.Role = ds.Tables["UserDetails"].Rows[0][ds.Tables[0].Columns["Role"].Ordinal].ToString();
 }
コード例 #10
0
        public override Task OnDisconnected()
        {
            ServiceReference2.WebService1Soap ws = new ServiceReference2.WebService1SoapClient();
            string msg = ws.DeleteSession("bcce7f7ad7596f963f4adb23d713e0d4", "329392de8a55edf86c0881a57381cbe6", Context.User.Identity.Name, Context.ConnectionId);
            if (msg != "ok")
            {
                Clients.Caller.ErrorOnServer("msg");

            }

            return base.OnDisconnected();
        }
コード例 #11
0
        public ActionResult RedirectIndex()
        {
            LoginModel loginM = (LoginModel)TempData["user"];
            ServiceReference2.WebService1Soap ws = new ServiceReference2.WebService1SoapClient();
            ViewBag.onlineusers = ws.GetOnlineUsers();
            if (Session["user"] == null && Request.IsAuthenticated)
            {
                return View("Index", loginM);

            }
            return View("Index", loginM);
        }
コード例 #12
0
        protected void btConfirmar_Click(object sender, EventArgs e)
        {
            ServiceReference2.WebService1SoapClient nn = new ServiceReference2.WebService1SoapClient();
            int  matricula = string.IsNullOrEmpty(TextBoxCodConferente.Text) ? 0 : Convert.ToInt32(TextBoxCodConferente.Text);
            long pedido    = string.IsNullOrEmpty(TextBoxNumero.Text) ? 0 : Convert.ToInt64(TextBoxNumero.Text);

            nn.ConfirmaConferenciaAutomatica(pedido, matricula);
            this.GridView1.DataBind();
            DesabilitarBotoes();
            TextBoxCodConferente.Text = "";
            TextBoxConferente.Text    = "";
            TextBoxNumero.Text        = "";
        }
コード例 #13
0
 protected void Page_Load(object sender, EventArgs e)
 {
     ServiceReference2.WebService1SoapClient nn = new ServiceReference2.WebService1SoapClient();
     this.GridView1.DataSource = nn.ListaPedidosParaConferencia();
     this.GridView1.DataBind();
     foreach (GridViewRow row in GridView1.Rows)
     {
         if (row.Cells[10].Text == "SIM")
         {
             row.Cells[10].BackColor = ColorTranslator.FromHtml("#D2691E");
         }
     }
 }
コード例 #14
0
        protected void btFinalizarConf_Click(object sender, EventArgs e)
        {
            ServiceReference2.WebService1SoapClient nn = new ServiceReference2.WebService1SoapClient();
            int  matricula = Convert.ToInt32(Request.QueryString["mat"]);
            long numped    = string.IsNullOrEmpty(TextBoxPedido.Text) ? 0 : Convert.ToInt64(TextBoxPedido.Text);

            nn.FinalizaConferencia(numped, matricula);
            LimparCampos();
            DesabilitarDigitação();
            TextBoxPedido.Visible = true;
            TextBoxPedido.Enabled = true;
            TextBoxPedido.Text    = "";
            btPesquisar.Visible   = true;
        }
コード例 #15
0
        protected void btPesquisar_Click(object sender, EventArgs e)
        {
            int  codConferente = Convert.ToInt32(Request.QueryString["mat"]);
            long numped        = string.IsNullOrEmpty(TextBoxPedido.Text) ? 0 : Convert.ToInt64(TextBoxPedido.Text);

            ServiceReference2.WebService1SoapClient nn = new ServiceReference2.WebService1SoapClient();
            int matricula     = nn.IniciaConferencia(numped).Maticula;
            int qt_Itens_org  = nn.ValidaConferenciaCompleta(numped).QT_Itens_Org;
            int qt_Itens_conf = nn.ValidaConferenciaCompleta(numped).QT_Itens_Conf;

            int condVenda  = Convert.ToInt32(nn.IniciaConferencia(numped).CondVenda);
            int OrdemConf  = Convert.ToInt32(nn.IniciaConferencia(numped).OrdemConf);
            int numCupom   = Convert.ToInt32(nn.IniciaConferencia(numped).NumCupom);
            int finalizado = ValidaPedidoFinalizado(numped);

            string posicao = nn.IniciaConferencia(numped).Posicao;

            if ((posicao == "F" && numCupom > 0 && OrdemConf == 4 && condVenda != 7) || (posicao != "F" && numCupom == 0 && OrdemConf == 4 && condVenda != 7))
            {
                if (matricula == 0 && ((qt_Itens_org) > qt_Itens_conf))
                {
                    nn.AtribuirPedidoParaCaonferente(codConferente, numped);
                    HabilitarBotaoPesquisar(numped);
                }
                else if (matricula == codConferente && ((qt_Itens_org) > qt_Itens_conf))
                {
                    HabilitarBotaoPesquisar(numped);
                }
                else if (finalizado > 0 && matricula == codConferente && (qt_Itens_org == qt_Itens_conf))
                {
                    HabilitarBotaoFinalizar();     // Novo
                }
                else if (numped == 0)
                {
                    String mensagem1 = "Pedido já finalizado ou invalido :" + numped;
                    ClientScript.RegisterClientScriptBlock(this.GetType(), "MensagemDeAlert", "alert('" + mensagem1 + "');", true);
                }
                else
                {
                    String mensagem = "Conferência Já Iniciada ou Finalizada: " + matricula;
                    ClientScript.RegisterClientScriptBlock(this.GetType(), "MensagemDeAlert", "alert('" + mensagem + "');", true);
                }
            }
            else
            {
                String mensagem3 = "Pedido já faturado ou não liberado pra conferência!";
                ClientScript.RegisterClientScriptBlock(this.GetType(), "MensagemDeAlert", "alert('" + mensagem3 + "');", true);
            }
        }
コード例 #16
0
ファイル: LoginModel.cs プロジェクト: nir-z/HaifanetMobile
        public LoginModel(string username,HttpRequestBase Request, string sessionid)
        {
            if (Request.IsAuthenticated)
            {

                var cookie = Request.Cookies[FormsAuthentication.FormsCookieName];
                var ticketInfo = FormsAuthentication.Decrypt(cookie.Value);
                ServiceReference2.WebService1Soap ws = new ServiceReference2.WebService1SoapClient();
                this.LoginDS = ws.Login("bcce7f7ad7596f963f4adb23d713e0d4", "329392de8a55edf86c0881a57381cbe6", ticketInfo.Name, ticketInfo.UserData, sessionid);
            }
            else
            {

                ServiceReference2.WebService1Soap ws = new ServiceReference2.WebService1SoapClient();
                this.LoginDS = ws.GetGuestInfo("bcce7f7ad7596f963f4adb23d713e0d4", "329392de8a55edf86c0881a57381cbe6");

            }
        }
コード例 #17
0
        protected void btPesquisar_Click(object sender, EventArgs e)
        {
            ServiceReference2.WebService1SoapClient nn = new ServiceReference2.WebService1SoapClient();
            int  matricula = string.IsNullOrEmpty(TextBoxCodConferente.Text) ? 0 : Convert.ToInt32(TextBoxCodConferente.Text);
            long pedido    = string.IsNullOrEmpty(TextBoxNumero.Text) ? 0 : Convert.ToInt64(TextBoxNumero.Text);

            int OrdemConf = Convert.ToInt32(nn.IniciaConferencia(pedido).OrdemConf);

            if (OrdemConf != 4)
            {
                String mensagem3 = "Pedido não enviado para o painel de conferência!";
                ClientScript.RegisterClientScriptBlock(this.GetType(), "MensagemDeAlert", "alert('" + mensagem3 + "');", true);
            }
            else if (matricula != 0)
            {
                TextBoxConferente.Text = nn.ConfirmaMatricula(matricula).Nome;
                HabilitarBotoes();
                this.GridView1.DataSource = nn.ListaItensParaConferencia(pedido);
                this.GridView1.DataBind();
            }
        }
コード例 #18
0
        protected void btEntrar_Click(object sender, EventArgs e)
        {
            int    matricula = string.IsNullOrEmpty(TextBoxMatricula.Text)?0: Convert.ToInt32(TextBoxMatricula.Text);
            string usuario   = TextBoxUsuario.Text;

            ServiceReference2.WebService1SoapClient nn = new ServiceReference2.WebService1SoapClient();
            nn.ConfirmaAcesso(usuario, matricula);
            string name = "";
            int    mat  = 0;

            name = nn.ConfirmaAcesso(usuario, matricula).Nome;
            mat  = nn.ConfirmaAcesso(usuario, matricula).Matricula;

            if (name != null && mat != 0)
            {
                Response.Redirect("AppConferencia.aspx?mat=" + mat + "&name=" + name);
            }
            else
            {
                String mensagem = "Usuário ou senha incorreto!";
                ClientScript.RegisterClientScriptBlock(this.GetType(), "MensagemDeAlert", "alert('" + mensagem + "');", true);
            }
        }
コード例 #19
0
        protected void btProduto_Click(object sender, EventArgs e)
        {
            HabilitarDigitação();
            long pedido = string.IsNullOrEmpty(TextBoxPedido.Text) ? 0 : Convert.ToInt64(TextBoxPedido.Text);
            int  codigo = string.IsNullOrEmpty(TextBoxCodigo.Text) ? 0 : Convert.ToInt32(TextBoxCodigo.Text);

            ServiceReference2.WebService1SoapClient nn = new ServiceReference2.WebService1SoapClient();
            string  descricao = nn.SepararProduto(pedido, codigo).Descricao;
            decimal qtPedida  = nn.SepararProduto(pedido, codigo).Qt;

            if (descricao == null || qtPedida == 0)
            {
                String mensagem = "Produto não consta na lista pra conferir: " + codigo;
                ClientScript.RegisterClientScriptBlock(this.GetType(), "MensagemDeAlert", "alert('" + mensagem + "');", true);
                TextBoxDescricao.Text = "";
                TextBoxQtPedida.Text  = "";
            }
            if (descricao != null && qtPedida != 0)
            {
                TextBoxDescricao.Text = descricao;
                TextBoxQtPedida.Text  = Convert.ToString(qtPedida);
            }
        }
コード例 #20
0
        //continuação...selecionar linha na grid
        protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
        {
            foreach (GridViewRow row in GridView1.Rows)
            {
                if (row.RowIndex == GridView1.SelectedIndex)
                {
                    row.BackColor = ColorTranslator.FromHtml("#A1DCF2");
                    row.ToolTip   = string.Empty;
                    String pedido        = row.Cells[0].Text;
                    String codigoProduto = row.Cells[5].Text;
                    String Descricao     = row.Cells[6].Text;

                    LbPedido.Text   = pedido;
                    LbCodigo.Text   = codigoProduto;
                    LbDescicao.Text = Descricao;

                    long numped  = Convert.ToInt64(pedido);
                    int  codprod = Convert.ToInt32(codigoProduto);
                    ConferenciaAlmoxarifado(numped, codprod);
                    ServiceReference2.WebService1SoapClient nn = new ServiceReference2.WebService1SoapClient();
                    this.GridView1.DataSource = nn.ListaPedidosdoAlmoxarifado();
                    this.GridView1.DataBind();
                    LbPedido.Visible   = false;
                    LbCodigo.Visible   = false;
                    LbDescicao.Visible = false;
                }
                else
                {
                    row.BackColor = ColorTranslator.FromHtml("#FFFFFF");
                    row.ToolTip   = "Click to select this row.";
                }
            }
            LbPedido.Visible   = true;
            LbCodigo.Visible   = true;
            LbDescicao.Visible = true;
        }
コード例 #21
0
 protected void Page_Load(object sender, EventArgs e)
 {
     ServiceReference2.WebService1SoapClient nn = new ServiceReference2.WebService1SoapClient();
     this.GridView1.DataSource = nn.ListaPedidosParaFaturar();
     this.GridView1.DataBind();
 }
コード例 #22
0
ファイル: LoginModel.cs プロジェクト: nir-z/HaifanetMobile
        public bool IsValid(string _username, string _password, string sessionid)
        {
            ServiceReference2.WebService1Soap ws = new ServiceReference2.WebService1SoapClient();
            DataSet ds = ws.Login("bcce7f7ad7596f963f4adb23d713e0d4", "329392de8a55edf86c0881a57381cbe6", _username, HashString(_password),sessionid);

            if (Convert.ToBoolean(ds.Tables[0].Rows[0]["valid"]))
            {
                this.LoginDS = ds;
                return true;
            }

            return false;
        }
コード例 #23
0
ファイル: Form1.cs プロジェクト: 2018302110/simple
 public Form1()
 {
     InitializeComponent();
     myWebService = new ServiceReference2.WebService1SoapClient("WebService1Soap");
 }