Beispiel #1
0
        protected void _ddl洗車種類_SelectedIndexChanged(object sender, EventArgs e)
        {
            CWorkType l_worktype = _context.CFactoryManager.CWorkTypeFactory.getCWorkTypeBy代碼(_ddl洗車種類.SelectedValue);

            if ("新車".Equals(_lbl工單種類.Text) || "員工".Equals(_lbl工單種類.Text) ||
                "試乘".Equals(_lbl工單種類.Text) || "購車周年".Equals(_lbl工單種類.Text) ||
                "保險公司介紹".Equals(_lbl工單種類.Text))
            {
                _txt金額.Text = l_worktype.f_moneyBySmid員工價.ToString();
            }
            else
            {
                _txt金額.Text = l_worktype.f_money價錢.ToString();
            }
        }
Beispiel #2
0
        protected void _btn設定_Click(object sender, EventArgs e)
        {
            if (使用者輸入條件())
            {
                CWorkType l_WorkType = _context.CFactoryManager.CWorkTypeFactory.createCWorkType();
                l_WorkType.f_typeid洗車種類代碼        = _txt代碼.Text.Trim();
                l_WorkType.f_typename洗車種類名稱      = _txt名稱.Text.Trim();
                l_WorkType.f_money價錢             = Convert.ToInt32(_txt價錢.Text.Trim());
                l_WorkType.f_moneyBySmid員工價      = Convert.ToInt32(_txt員工價.Text.Trim());
                l_WorkType.f_moneyByIn內部員工薪資     = Convert.ToInt32(_txt內部薪資.Text.Trim());
                l_WorkType.f_moneyByOut外部員工薪資    = Convert.ToInt32(_txt外部薪資.Text.Trim());
                l_WorkType.f_boundByService服務獎金數 = Convert.ToDouble(_txt服務獎金.Text.Trim());
                l_WorkType.f_boundBySmid業代獎金數    = Convert.ToDouble(_txt業代獎金.Text.Trim());

                _context.CFactoryManager.CWorkTypeFactory.insert(l_WorkType);
                ScriptManager.RegisterClientScriptBlock(UpdatePanel1, typeof(UpdatePanel), "OK", "alert('設定成功');", true);

                clearUI();
                search();
            }
        }