Ejemplo n.º 1
0
 public static void ValidateUpdateCode(int codeID, string code)
 {
     Broker.DataAccess.Municipality municipality = new Broker.DataAccess.Municipality();
     municipality.Code = code;
     municipality.ID   = codeID;
     municipality.TestBeforeUpdate();
 }
Ejemplo n.º 2
0
    protected void btnDelete_Click1(object sender, EventArgs e)
    {
        if (GXGridView1.SelectedIndex != -1)
        {
            int municipalityID = 0;
            if (GXGridView1.SelectedDataKey != null)
            {
                int GXgvSelectedValue = Convert.ToInt32(GXGridView1.SelectedValue);
                municipalityID = GXgvSelectedValue;
                dvDataSource.SelectParameters.Clear();
                dvDataSource.SelectParameters.Add("id", GXgvSelectedValue.ToString());
                DetailsView1.DataBind();
            }
            else
            {
                int GXgvSelectedValue = GXGridView1SelectedValue;
                municipalityID = GXgvSelectedValue;
                dvDataSource.SelectParameters.Clear();
                dvDataSource.SelectParameters.Add("id", GXgvSelectedValue.ToString());
                DetailsView1.DataBind();
            }
            Broker.DataAccess.Municipality m = Broker.DataAccess.Municipality.Get(municipalityID);
            m.IsActive = false;
            Broker.DataAccess.Municipality.Table.Context.SubmitChanges();

            GXGridView1.TotalRecords = ActiveMunicipality.SelectCountCached();
            GXGridView1.DataBind();
            mvMain.SetActiveView(viewGrid);
        }
    }
Ejemplo n.º 3
0
 public static void ValidateInsertCode(string code)
 {
     Broker.DataAccess.Municipality municipality = new Broker.DataAccess.Municipality();
     municipality.Code = code;
     municipality.TestBeforeInsert();
 }