Exemple #1
0
        private void 修改產品檔(string p_strId)
        {
            CKGPartFactory l_factory = iv_context.CFactoryManager.CKGPartFactory;
            CKGPart        l_code產品檔 = l_factory.createCKGPart();

            l_code產品檔.f_id = Convert.ToInt32(p_strId);
            l_code產品檔.f_ProductName產品名稱 = iv_txt產品名稱.Text.Trim();
            l_code產品檔.f_Qty單位           = iv_txt產品單位.Text.Trim();
            l_code產品檔.f_Cost成本價         = Convert.ToInt32("0" + iv_txt成本價.Text.Trim());
            l_code產品檔.f_SalePrice業代價    = Convert.ToInt32("0" + iv_txt業代價.Text.Trim());
            l_code產品檔.f_ListPrice售價     = Convert.ToInt32("0" + iv_txt建議售價.Text.Trim());

            l_factory.updateCKGPart單位and價位(l_code產品檔);

            string l_strShow = "alert('修改成功');";

            ScriptManager.RegisterClientScriptBlock(UpdatePanel1, typeof(UpdatePanel), "OK", l_strShow, true);
        }
Exemple #2
0
        private void 查詢資料(string p_strType)
        {
            CKGPartFactory l_factory = _context.CFactoryManager.CKGPartFactory;
            CKGPart        l_code產品檔 = l_factory.createCKGPart();

            l_code產品檔.f_TypeID類別編號      = iv_cbo類別名稱.SelectedValue;
            l_code產品檔.f_CategoryID種類編號  = iv_cbo種類名稱.SelectedValue;
            l_code產品檔.f_ProductID產品編號   = iv_txt產品編號.Text.Trim();
            l_code產品檔.f_ProductName產品名稱 = iv_txt產品名稱.Text.Trim();

            CKGPart[] l_codes查詢 = l_factory.get產品By查詢(l_code產品檔);

            if ("按查詢".Equals(p_strType) && l_codes查詢 == null)
            {
                GridView1.DataSource = null;
                GridView1.DataBind();
                ScriptManager.RegisterClientScriptBlock(UpdatePanel1, typeof(UpdatePanel), "OK", "alert('查無資料');", true);
                return;
            }

            display(l_codes查詢);
        }