Exemplo n.º 1
0
        protected void Save_Click(object sender, EventArgs e)
        {
            var updateClientData = new db_ptcDataContext();

            int cid;

            bool IsIntValue = Int32.TryParse(hfClientid.Value, out cid);

            if (IsIntValue)
            {
                var testquery = (from c in updateClientData.Clients
                                 where c.ClientId == cid
                                 join con in updateClientData.Contacts on c.ClientContactid equals con.Contactid
                                 select new { c, con }).FirstOrDefault();

                testquery.c.ClientName         = udClientName.Text;
                testquery.c.ClientContactid    = Convert.ToInt32(ClientContactdd1.SelectedValue);
                testquery.c.ClientAddressLine1 = udClientAddressLine1.Value;
                testquery.c.ClientAddressLine2 = udClientAddressLine2.Value;
                testquery.c.ClientAddressCity  = udClientAddressCity.Value;
                testquery.c.ClientAddressState = udClientAddressState.Value;
                testquery.c.ClientAddressZip   = udClientAddressZip.Value;
                testquery.c.ClientNotes        = udClientNotes.Value;



                updateClientData.SubmitChanges();
            }
        }
Exemplo n.º 2
0
        public void GetClientInfo()
        {
            if (!IsPostBack)
            {
                db_ptcDataContext clientdatacontext = new db_ptcDataContext();

                int cid;

                bool IsIntValue = Int32.TryParse(hfClientid.Value, out cid);

                if (IsIntValue)
                {
                    var ClientData = (
                        from c in clientdatacontext.Clients
                        where c.ClientId == cid
                        join con in clientdatacontext.Contacts on c.ClientContactid equals con.Contactid
                        select new
                    {
                        c.ClientId,
                        c.ClientName,
                        c.ClientAddressLine1,
                        c.ClientAddressLine2,
                        c.ClientAddressState,
                        c.ClientAddressCity,
                        c.ClientAddressZip,
                        c.ClientNotes,
                        c.ClientContactid,
                        con.ContactSalutation,
                        con.ContactFirstName,
                        con.ContactLastname,
                        con.ContactBusinessNumber,
                        con.ContactBusinessNumberExtension,
                        con.ContactCellularNumber,
                        con.ContactEmailAddress,
                        con.ContactAltEmailAddress,
                    }).FirstOrDefault();

                    lbclientname.Text          = ClientData.ClientName;
                    lbaddressline1.Text        = ClientData.ClientAddressLine1;
                    lbaddressline2.Text        = ClientData.ClientAddressLine2;
                    lbstate.Text               = ClientData.ClientAddressState;
                    lbcity.Text                = ClientData.ClientAddressCity;
                    lbzipcode.Text             = ClientData.ClientAddressZip;
                    lbsaluation.Text           = ClientData.ContactSalutation;
                    lbfirstname.Text           = ClientData.ContactFirstName;
                    lblastname.Text            = ClientData.ContactLastname;
                    lbcellphone.Text           = Convert.ToInt64(ClientData.ContactCellularNumber).ToString("(###) ###-####");
                    lbbusphone.Text            = Convert.ToInt64(ClientData.ContactBusinessNumber).ToString("(###) ###-####");
                    udClientName.Text          = ClientData.ClientName;
                    udClientAddressLine1.Value = ClientData.ClientAddressLine1;
                    udClientAddressLine2.Value = ClientData.ClientAddressLine2;
                    udClientAddressCity.Value  = ClientData.ClientAddressCity;
                    udClientAddressState.Value = ClientData.ClientAddressState;
                    udClientAddressZip.Value   = ClientData.ClientAddressZip;
                    udClientNotes.Value        = ClientData.ClientNotes;
                }
            }
        }
Exemplo n.º 3
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            db_ptcDataContext ADsearch = new db_ptcDataContext();


            // int AD;
            {
                var lookup = (
                    from tb in ADsearch.SearchAppraisalDistrictDatas
                    where tb.prop_id.ToString() == wzParcelPropId.Value

                    select new
                {
                    tb.geo_id,
                    tb.prop_type_cd,
                    tb.legal_desc,
                    tb.situs_street,
                    tb.py_owner_name,
                    tb.py_addr_line1,
                    tb.py_addr_line2,
                    tb.py_addr_city,
                    tb.py_addr_state,
                    tb.py_addr_zip,
                    tb.py_addr_zip_cass,
                    tb.land_acres,
                    tb.property_name,
                    tb.gross_building_area,
                    tb.net_rentable_area,
                    tb.year_built,
                    tb.prop_use_cd,
                    tb.prop_use_desc,
                }).FirstOrDefault();



                wzParcelGeoId.Value = lookup.geo_id;
                //wzParcelType.Value = lookup.prop_type_cd;
                wzParcelLegalDesc.Value         = lookup.legal_desc;
                wzParcelSitusStreet.Value       = lookup.situs_street;
                wzParcelOwnerName.Value         = lookup.py_owner_name + ' ' + lookup.py_addr_line1;
                wzParcelOwnerAddressLine1.Value = lookup.py_addr_line2;
                wzParcelOwnerAddressCity.Value  = lookup.py_addr_city;
                wzParcelOwnerAddressState.Value = lookup.py_addr_state;
                wzParcelOwnerAddressZip.Value   = lookup.py_addr_zip + '-' + lookup.py_addr_zip_cass;
                wzParcelDBA.Value            = lookup.property_name;
                wzParcelCharAcre.Value       = lookup.land_acres;
                wzParcelCharGBA1.Value       = Convert.ToInt64(lookup.gross_building_area).ToString("###,###");
                wzParcelCharNLA1.Value       = Convert.ToInt64(lookup.net_rentable_area).ToString("##,##");
                wzParcelPropUseCd.Value      = lookup.prop_use_cd;
                wzParcelCharYearBuilt1.Value = lookup.year_built.ToString();
                wzParcelPropUseDesc1.Value   = lookup.prop_use_desc;
            }
        }
Exemplo n.º 4
0
        protected void ClientContactSelect()
        {
            using (var contactTB = new db_ptcDataContext())
            {
                ClientContactdd1.DataSource = from Contact in contactTB.Contacts
                                              orderby Contact.ContactLastname
                                              select new { Contact.ContactLastname, Contact.ContactFirstName, Contact.Contactid, ContactFullName = string.Format("{0},{1}", Contact.ContactLastname, Contact.ContactFirstName) };

                ClientContactdd1.DataTextField  = "ContactFullName";
                ClientContactdd1.DataValueField = "Contactid";
                ClientContactdd1.DataBind();
            }
        }
Exemplo n.º 5
0
        public void ClientSelect()
        {
            using (var clientTB = new db_ptcDataContext())
            {
                ClientDropDownList.DataSource = from Client in clientTB.Clients
                                                orderby Client.ClientName
                                                select new { Client.ClientName, Client.ClientId };
                ClientDropDownList.DataTextField  = "ClientName";
                ClientDropDownList.DataValueField = "ClientId";
                ClientDropDownList.DataBind();

                ClientDropDownList.Items.Insert(0, new ListItem("Search Client", "NA"));
            }
        }
Exemplo n.º 6
0
        protected void PropertyContactSelect()

        {
            using (var contactTB = new db_ptcDataContext())
            {
                PropertyContactdd1.DataSource = from Contact in contactTB.Contacts
                                                orderby Contact.ContactLastname
                                                select new { Contact.ContactLastname, Contact.ContactFirstName, Contact.Contactid, ContactFullName = string.Format("{0},{1}", Contact.ContactLastname, Contact.ContactFirstName) };

                PropertyContactdd1.DataTextField  = "ContactFullName";
                PropertyContactdd1.DataValueField = "Contactid";
                PropertyContactdd1.DataBind();

                PropertyContactdd1.Items.Insert(0, new ListItem("Select Contact", "NA"));
            }
        }
Exemplo n.º 7
0
        protected void Save_Click(object sender, EventArgs e)
        {
            var ContactTable = new db_ptcDataContext();

            {
                Contact cont = new Contact();


                cont.ContactFirstName    = fmContactFirstName.Value;
                cont.ContactLastname     = fmContactLastName.Value;
                cont.ContactAddressLine1 = fmContactAddressLine1.Value;
                cont.ContactAddressCity  = fmContactAddressCity.Value;
                cont.ContactAddressState = fmContactAddressState.Value;
                cont.ContactAddressZip   = fmContactAddressZip.Value;

                ContactTable.Contacts.InsertOnSubmit(cont);
                ContactTable.SubmitChanges();

                Response.Redirect("~/viewcontact.aspx");
            }
        }
Exemplo n.º 8
0
        private void Populate_contact_table()
        {
            using (db_ptcDataContext contact_dc = new db_ptcDataContext())

            {
                var contactdata =
                    from con1 in contact_dc.Contacts
                    orderby con1.ContactLastname, con1.ContactFirstName
                    select new
                {
                    ContactFirstName = con1.ContactFirstName,
                    ContactLastName  = con1.ContactLastname,
                    ContactEmail     = con1.ContactEmailAddress,
                };



                Contact_Datagrid.DataSource = contactdata;
                Contact_Datagrid.DataBind();
            }
        }
Exemplo n.º 9
0
        protected void addproperty_Click(object sender, EventArgs e)
        {
            var InsertProperty = new db_ptcDataContext();

            int cid;

            bool IsIntValue = Int32.TryParse(hfClientid.Value, out cid);

            if (IsIntValue)
            {
                {
                    Property prop = new Property();

                    prop.PropertyClientId       = cid;
                    prop.PropertyName           = wzPropertyName.Value;
                    prop.InternalCode           = wzInternalCode.Value;
                    prop.PropertyActiviatedDate = Convert.ToDateTime(wzPropertyActiveDate.Value);
                    prop.PropertyAddressLine1   = wzPropertyAddressLine1.Value;
                    prop.PropertyAddressLine2   = wzPropertyAddressLine2.Value;
                    prop.PropertyAddressCity    = wzPropertyAddressCity.Value;
                    prop.PropertyAddressState   = wzPropertyAddressState.Value;
                    prop.PropertyAddressZip     = wzPropertyAddressZip.Value;
                    prop.PropertyCharGBA        = Convert.ToInt32(wzPropertyCharGBA.Value);
                    prop.PropertyCharNLA        = Convert.ToInt32(wzPropertyCharNLA.Value);
                    prop.PropertyCharUnits      = Convert.ToInt32(wzPropertyCharUnits.Value);
                    prop.PropertyCharYearBuilt  = wzPropertyCharYearBuilt.Value;
                    prop.PropertyCounty         = wzPropertyCounty.Value;
                    prop.PropertyInfoSalesDate  = Convert.ToDateTime(wzPropertyInfoSalesDate.Value);
                    prop.PropertyInfoSalesPrice = Convert.ToDecimal(wzPropertyInfoSalesPrice.Value);
                    prop.PropertyPrimaryUse     = wzPropertyPrimaryuse.Value;


                    InsertProperty.Properties.InsertOnSubmit(prop);
                    InsertProperty.SubmitChanges();
                }
            }
        }
Exemplo n.º 10
0
        protected void getpropdetails()

        {
            db_ptcDataContext propdetailcontext = new db_ptcDataContext();

            int pid;

            bool IsIntValue = Int32.TryParse(hfpropid.Value, out pid);

            if (IsIntValue)
            {
                var propertydetails = (
                    from p in propdetailcontext.Properties
                    join con in propdetailcontext.Contacts on p.PropertyContactid equals con.Contactid into pp
                    from con in pp.DefaultIfEmpty()
                    where p.PropertyId == pid
                    select new
                {
                    con.ContactFirstName,
                    con.ContactLastname,
                    con.ContactEmailAddress,
                    con.ContactBusinessNumber,
                    con.ContactBusinessNumberExtension,
                    con.ContactCellularNumber,
                    con.ContactFaxNumber,
                    p.PropertyCounty,
                    p.PropertyAddressLine1,
                    p.PropertyAddressLine2,
                    p.PropertyAddressCity,
                    p.PropertyAddressState,
                    p.PropertyAddressZip,
                    p.PropertyCharGBA,
                    p.PropertyCharNLA,
                    p.PropertyCharUnits,
                    p.PropertyCharYearBuilt,
                    p.PropertyName,
                    p.PropertyActiviatedDate,
                    p.PropertyPrimaryUse,
                    p.PropertyAOAExpDate,
                    p.InternalCode
                }).FirstOrDefault();



                ptclientname.Text   = propertydetails.PropertyName;
                ptfirstname.Text    = propertydetails.ContactFirstName;
                ptlastname.Text     = propertydetails.ContactLastname;
                ptemail.Text        = propertydetails.ContactEmailAddress;
                ptbusphone.Text     = propertydetails.ContactBusinessNumber;
                ptcellphone.Text    = propertydetails.ContactCellularNumber;
                ptfaxnumber.Text    = propertydetails.ContactFaxNumber;
                ptcounty.Text       = propertydetails.PropertyCounty;
                ptaddressline1.Text = propertydetails.PropertyAddressLine1;
                ptaddresline2.Text  = propertydetails.PropertyAddressLine2;
                ptcity.Text         = propertydetails.PropertyAddressCity;
                ptstate.Text        = propertydetails.PropertyAddressState;
                ptzip.Text          = propertydetails.PropertyAddressZip;
                ptyearbuilt.Text    = propertydetails.PropertyCharYearBuilt;
                ptgba.Text          = propertydetails.PropertyCharGBA.ToString();
                ptnla.Text          = propertydetails.PropertyCharNLA.ToString();
                ptunits.Text        = propertydetails.PropertyCharUnits.ToString();
                ptactivedate.Text   = propertydetails.PropertyActiviatedDate.ToShortDateString();
                ptpropcode.Text     = propertydetails.InternalCode;
            }
        }
Exemplo n.º 11
0
 protected void appealformselect()
 {
     using (var parcelstb = new db_ptcDataContext())
     {
     }
 }