public SDevice(SVendor vendor, SFunctionArray function, EHandshake handshake, byte address)
 {
     this.Vendor    = new SVendor(vendor.Brand, vendor.Model, vendor.Version);
     this.Function  = function;
     this.Handshake = handshake;
     this.Address   = address;
 }
Exemplo n.º 2
0
        protected void btnUpdate_Click(object sender, EventArgs e)
        {
            try
            {
                if (hddnVendorID.Value != "")
                {
                    int DistributorID = Convert.ToInt32(Session["DistributorID"]);
                    int LoginID       = Convert.ToInt32(Session["LoginID"]);

                    SVendor vendr = new SVendor();
                    vendr.VendorID            = Convert.ToInt32(hddnVendorID.Value);
                    vendr.VendorName          = txtVendorName.Text.Trim();
                    vendr.VendorCode          = txtVendorCode.Text;
                    vendr.VendorEmail         = txtEmail.Text.Trim();
                    vendr.VendorContactPerson = txtContactPerson.Text.Trim();
                    vendr.VendorAddress       = txtAddress.Text.Trim();
                    vendr.VendorMobile        = txtContactNumber.Text.Trim();
                    vendr.IsActive            = CheckBox1.Checked;
                    int ClientTypeID = Convert.ToInt32(Session["ClientTypeID"]);
                    int a            = svc.UpdateVendorService(DistributorID, LoginID, ClientTypeID, vendr);

                    if (a > 0)
                    {
                        ShowPopUpMsg("Network Updated Successfully");
                        ResetControl(1);

                        btnUpdate.Visible = false;
                        liUpdate.Visible  = false;
                    }
                    else
                    {
                        ShowPopUpMsg("Network Updated Unsuccessfully \n Please Try Again");
                    }
                }
                else
                {
                    //ShowPopUpMsg("Please Fill Vendor Name");
                }
            }
            catch (Exception ex)
            {
            }
        }
Exemplo n.º 3
0
        public void FillVendor(string Identity)
        {
            SVendor cv = new SVendor();

            cv.VendorID = Convert.ToInt32(Identity);
            DataSet ds = svc.GetSingleVendorService(cv);

            if (ds != null)
            {
                hddnVendorID.Value    = Convert.ToString(ds.Tables[0].Rows[0]["VendorID"]);
                txtVendorName.Text    = Convert.ToString(ds.Tables[0].Rows[0]["VendorName"]);
                txtVendorCode.Text    = Convert.ToString(ds.Tables[0].Rows[0]["VendorCode"]);
                txtEmail.Text         = Convert.ToString(ds.Tables[0].Rows[0]["VendorEmail"]);
                txtContactPerson.Text = Convert.ToString(ds.Tables[0].Rows[0]["ContactPerson"]);
                txtAddress.Text       = Convert.ToString(ds.Tables[0].Rows[0]["VendorAddress"]);
                txtContactNumber.Text = Convert.ToString(ds.Tables[0].Rows[0]["VendorMobile"]);

                CheckBox1.Checked = Convert.ToBoolean(ds.Tables[0].Rows[0]["FlagActive"]);
            }
        }