Esempio n. 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            /*
             * Op I - É incluir
             * Op A - É alterar
             */

            if (!IsPostBack)
            {
                /***********************************************************/
                abastecimento = new Abastecimento();
                abastecimento.novo();
                setSession();
                /***********************************************************/
                listaCombustivel();
                ddCombustivel.Items.Add(new ListItem("Selecione", "0", true));
                ddCombustivel.Items.FindByValue("0").Selected = true;
                /***********************************************************/
                listaPosto();
                ddPosto.Items.Add(new ListItem("Selecione", "0", true));
                ddPosto.Items.FindByValue("0").Selected = true;
                /***********************************************************/
                if (Request.QueryString["op"] == "A")
                {
                    daoAbastecimento = new DAOAbastecimento(arquivo);
                    abastecimento.ID = Int32.Parse(Request.QueryString["id"]);
                    daoAbastecimento.buscarID(abastecimento);
                    getDados();
                    abastecimento.editar();
                    setSession();
                }
            }
        }
Esempio n. 2
0
 private void getSaldo()
 {
     if (txbData.Text.Length == 10 &&
         Solucon.DataHora.DataLib.DateValid(txbData.Text))
     {
         abastecimento = (Session["abastecimento"] as Abastecimento);
         DAOAbastecimento daoAbastecimento = new DAOAbastecimento();
         saldo_funcionario = daoAbastecimento.verifSaldo(abastecimento.Funcionario,
                                                         DateTime.Parse(txbData.Text).Month, DateTime.Parse(txbData.Text).Year);
     }
 }
Esempio n. 3
0
 public DAOFacadeAbastecimento()
 {
     daoAbastecimento = new DAOAbastecimento(@"G:\App\VSCNET\Web\CFuelWeb\App_Data\");
 }
Esempio n. 4
0
 public DAOFacadeAbastecimento()
 {
     daoAbastecimento = new DAOAbastecimento(@"G:\App\VSCNET\Web\CFuelWeb\App_Data\");
 }
Esempio n. 5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            /*
             * Op I - É incluir
             * Op A - É alterar
             */

            if (!IsPostBack)
            {
                /***********************************************************/
                abastecimento = new Abastecimento();
                abastecimento.novo();
                setSession();
                /***********************************************************/
                listaCombustivel();
                ddCombustivel.Items.Add(new ListItem("Selecione", "0", true));
                ddCombustivel.Items.FindByValue("0").Selected = true;
                /***********************************************************/
                listaPosto();
                ddPosto.Items.Add(new ListItem("Selecione", "0", true));
                ddPosto.Items.FindByValue("0").Selected = true;
                /***********************************************************/
                if (Request.QueryString["op"] == "A")
                {
                    daoAbastecimento = new DAOAbastecimento(arquivo);
                    abastecimento.ID = Int32.Parse(Request.QueryString["id"]);
                    daoAbastecimento.buscarID(abastecimento);
                    getDados();
                    abastecimento.editar();
                    setSession();
                }
            }
        }