Beispiel #1
0
    private bool DiaCheck()
    {
        string pData = DateTime.Now.Date.ToShortDateString();

        DataTable lTabela = FrequenciaModelo.FrequenciaLista(DateTime.Parse(pData));

        if (lTabela.Rows.Count > 0)
        {
            hfCodigo.Value = lTabela.Rows[0]["CODIGO"].ToString();
            return(true);
        }
        else
        {
            return(false);
        }
    }
Beispiel #2
0
    private void CarregaInfo(string pData)
    {
        DataTable lTableData = FrequenciaModelo.FrequenciaLista(DateTime.Parse(pData));

        if (lTableData.Rows.Count > 0)
        {
            txtObservacao.Text    = lTableData.Rows[0]["OBSERVACAO"].ToString();
            ddlTipo.SelectedValue = lTableData.Rows[0]["TIPO"].ToString();
            txtPeso.Text          = lTableData.Rows[0]["PESO"].ToString();
            hfCodigo.Value        = lTableData.Rows[0]["CODIGO"].ToString();

            ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "NomedaJanela", "$(function(){$('#myModalFrequencia').modal('show');});", true);
        }
        else
        {
            txtObservacao.Text = "";
            txtPeso.Text       = "1";
            hfCodigo.Value     = "";

            ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "NomedaJanela", "$(function(){$('#myModalFrequencia').modal('show');});", true);
        }
    }