Exemplo n.º 1
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            bool isInsert = false;
            HEWDataContext context = new HEWDataContext();
            var cpabilitiesObj = context.Capabilities.SingleOrDefault();
            if (cpabilitiesObj == null)
            {
                cpabilitiesObj = new Capability();
                isInsert = true;
            }
            cpabilitiesObj.CapitalDevelopment = txtCapitalDev.Text.Trim();
            cpabilitiesObj.NetAssestsDevelopment = txtAssetsDev.Text.Trim();
            cpabilitiesObj.TotalEmployees = txtStaff.Text.Trim();

            if(isInsert)
                context.Capabilities.InsertOnSubmit(cpabilitiesObj);

            context.SubmitChanges();
            Response.Redirect(Request.RawUrl);
        }
Exemplo n.º 2
0
 partial void UpdateCapability(Capability instance);
Exemplo n.º 3
0
 partial void DeleteCapability(Capability instance);
Exemplo n.º 4
0
 partial void InsertCapability(Capability instance);