コード例 #1
0
ファイル: TaxRateManage.aspx.cs プロジェクト: evelh/Done
        protected void Page_Load(object sender, EventArgs e)
        {
            long regionId = 0;

            if (!string.IsNullOrEmpty(Request.QueryString["regionId"]) && long.TryParse(Request.QueryString["regionId"], out regionId))
            {
                thisTaxRegion = genBll.GetSingleGeneral(regionId, true);
            }
            long cateId = 0;

            if (!string.IsNullOrEmpty(Request.QueryString["cateId"]) && long.TryParse(Request.QueryString["cateId"], out cateId))
            {
                thisTaxCate = genBll.GetSingleGeneral(cateId, true);
            }

            long id = 0;

            if (!string.IsNullOrEmpty(Request.QueryString["id"]) && long.TryParse(Request.QueryString["id"], out id))
            {
                thisCate = genBll.GetRegionCate(id);
            }
            if (thisCate != null)
            {
                isAdd         = false;
                thisTaxRegion = genBll.GetSingleGeneral(thisCate.tax_region_id, true);
                thisTaxCate   = genBll.GetSingleGeneral(thisCate.tax_cate_id, true);
                taxList       = genBll.GetCateTaxList(thisCate.id);
            }
        }
コード例 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            type = Request.QueryString["type"];
            long id = 0;

            if (long.TryParse(Request.QueryString["id"], out id))
            {
                thisDic = genBll.GetSingleGeneral(id);
            }
            if (thisDic != null)
            {
                isAdd = false;
                if (thisDic.parent_id == (int)DicEnum.SKILLS_CATE_TYPE.CERTIFICATION)
                {
                    type = "Certificate";
                }
                else if (thisDic.parent_id == (int)DicEnum.SKILLS_CATE_TYPE.DEGREE)
                {
                    type = "Degree";
                }
                if (thisDic.general_table_id != (int)GeneralTableEnum.SKILLS_CATE)
                {
                    isAdd   = true;
                    thisDic = null;
                }
            }
            if (type == "Certificate")
            {
                parentlId = (int)DicEnum.SKILLS_CATE_TYPE.CERTIFICATION; typeName = "证书";
            }
            else if (type == "Degree")
            {
                parentlId = (int)DicEnum.SKILLS_CATE_TYPE.DEGREE; typeName = "学位";
            }
        }
コード例 #3
0
ファイル: HolidaySet.aspx.cs プロジェクト: evelh/Done
        protected void Page_Load(object sender, EventArgs e)
        {
            var bll = new GeneralBLL();

            if (long.TryParse(Request.QueryString["id"], out id))
            {
                isAdd = false;
                var holiday = bll.GetSingleGeneral(id);
                name        = holiday.name;
                description = holiday.remark;
            }
            if (IsPostBack)
            {
                string hname = Request.Form["holidayName"];
                string hdesc = Request.Form["description"];
                if (isAdd)
                {
                    bll.AddHolidaySet(hname, hdesc, LoginUserId);
                }
                else
                {
                    if (hdesc != description || hname != name)
                    {
                        bll.EditHolidaySet(id, hname, hdesc, LoginUserId);
                    }
                }
                Response.Write("<script>window.close();self.opener.location.reload();</script>");
                Response.End();
            }
        }
コード例 #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(Request.QueryString["parentId"]))
            {
                parentId = int.Parse(Request.QueryString["parentId"]);
            }
            if (!string.IsNullOrEmpty(Request.QueryString["tableId"]))
            {
                int.TryParse(Request.QueryString["tableId"], out tableId);
            }
            long id = 0;

            if (!string.IsNullOrEmpty(Request.QueryString["id"]) && long.TryParse(Request.QueryString["id"], out id))
            {
                thisIssue = genBll.GetSingleGeneral(id);
            }
            if (thisIssue != null)
            {
                isAdd   = false;
                tableId = thisIssue.general_table_id;
                if (tableId == (int)DTO.GeneralTableEnum.TASK_ISSUE_TYPE)
                {
                    subIssueList = new DAL.d_general_dal().GetGeneralByParentId(thisIssue.id);
                }
            }
        }
コード例 #5
0
ファイル: ResourceDicForm.aspx.cs プロジェクト: evelh/Done
        protected void Page_Load(object sender, EventArgs e)
        {
            type = Request.QueryString["type"];

            long id = 0;

            if (long.TryParse(Request.QueryString["id"], out id))
            {
                thisDic = genBll.GetSingleGeneral(id);
            }
            if (thisDic != null)
            {
                isAdd = false;
                if (thisDic.parent_id != null)
                {
                    var thisParent = genBll.GetSingleGeneral((long)thisDic.parent_id);
                    if (thisParent != null)
                    {
                        if (thisParent.parent_id == (int)DicEnum.SKILLS_CATE_TYPE.CERTIFICATION)
                        {
                            type = "Certificate";
                        }
                        else if (thisParent.parent_id == (int)DicEnum.SKILLS_CATE_TYPE.DEGREE)
                        {
                            type = "Degree";
                        }
                    }
                }
            }
            if (type == "Certificate")
            {
                generalId = (int)DicEnum.SKILLS_CATE_TYPE.CERTIFICATION; typeName = "证书";
            }
            else if (type == "Degree")
            {
                generalId = (int)DicEnum.SKILLS_CATE_TYPE.DEGREE; typeName = "学位";
            }
            cateList = new DAL.d_general_dal().GetGeneralByParentId(generalId);
            // 实体读取 table=60
            // 类别读取 table = 175
        }
コード例 #6
0
ファイル: ConfigType.aspx.cs プロジェクト: evelh/Done
 protected void Page_Load(object sender, EventArgs e)
 {
     id = Convert.ToInt64(Request.QueryString["id"]);
     if (!IsPostBack)
     {
         long group_udf_id = 0;
         if (id > 0)  //修改数据
         {
             configtype            = configtypebll.GetSingleGeneral(id);
             this.Config_name.Text = configtype.name;
             if (configtype.is_active > 0)
             {
                 this.Active.Checked = true;
             }
             if (configtype.ext1 != null && !string.IsNullOrEmpty(configtype.ext1.ToString()))
             {
                 group_udf_id = Convert.ToInt64(configtype.ext1.ToString());
             }
         }
         GetAlludf = ctbll.GetAlludf(group_udf_id);
     }
 }
コード例 #7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            long id = 0;

            if (!string.IsNullOrEmpty(Request.QueryString["id"]) && long.TryParse(Request.QueryString["id"], out id))
            {
                ledger = genBll.GetSingleGeneral(id);
            }
            if (ledger != null && ledger.delete_time == 0)
            {
                isAdd    = false;
                codeList = new CostCodeBLL().GetWorkCodeByLedger(ledger.id);
            }
        }
コード例 #8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            long id = 0;

            if (!string.IsNullOrEmpty(Request.QueryString["id"]))
            {
                if (long.TryParse(Request.QueryString["id"], out id))
                {
                    thisGeneral = genBll.GetSingleGeneral(id);
                }
            }
            if (thisGeneral == null)
            {
                Response.Write("<script>alert('未获取到相关信息');window.close();</script>");
            }
        }
コード例 #9
0
        protected void Page_Load(object sender, EventArgs e)
        {
            long id = 0;

            if (!string.IsNullOrEmpty(Request.QueryString["id"]) && long.TryParse(Request.QueryString["id"], out id))
            {
                thisTaxCate = genBll.GetSingleGeneral(id, true);
            }
            if (thisTaxCate != null)
            {
                isAdd = false;
                List <d_cost_code> CodeList = codeBll.GetCodeByTaxCate(thisTaxCate.id);
                if (CodeList != null && CodeList.Count > 0)
                {
                    List <d_cost_code> workType      = CodeList.Where(_ => _.cate_id == (int)DicEnum.COST_CODE_CATE.GENERAL_ALLOCATION_CODE).ToList();
                    List <d_cost_code> expenseType   = CodeList.Where(_ => _.cate_id == (int)DicEnum.COST_CODE_CATE.EXPENSE_CATEGORY).ToList();
                    List <d_cost_code> materialType  = CodeList.Where(_ => _.cate_id == (int)DicEnum.COST_CODE_CATE.MATERIAL_COST_CODE).ToList();
                    List <d_cost_code> serviceType   = CodeList.Where(_ => _.cate_id == (int)DicEnum.COST_CODE_CATE.RECURRING_CONTRACT_SERVICE_CODE).ToList();
                    List <d_cost_code> milestoneType = CodeList.Where(_ => _.cate_id == (int)DicEnum.COST_CODE_CATE.MILESTONE_CODE).ToList();
                    if (workType.Count > 0)
                    {
                        workType.ForEach(_ => {
                            workTypeIds += _.id.ToString() + ',';
                        });
                    }
                    if (expenseType.Count > 0)
                    {
                        expenseType.ForEach(_ => {
                            expenseIds += _.id.ToString() + ',';
                        });
                    }
                    if (materialType.Count > 0)
                    {
                        materialType.ForEach(_ => {
                            materialIds += _.id.ToString() + ',';
                        });
                    }
                    if (serviceType.Count > 0)
                    {
                        serviceType.ForEach(_ => {
                            serviceIds += _.id.ToString() + ',';
                        });
                    }
                    if (milestoneType.Count > 0)
                    {
                        milestoneType.ForEach(_ => {
                            milestoneIds += _.id.ToString() + ',';
                        });
                    }

                    if (!string.IsNullOrEmpty(workTypeIds))
                    {
                        workTypeIds = workTypeIds.Substring(0, workTypeIds.Length - 1);
                    }
                    if (!string.IsNullOrEmpty(materialIds))
                    {
                        materialIds = materialIds.Substring(0, materialIds.Length - 1);
                    }
                    if (!string.IsNullOrEmpty(serviceIds))
                    {
                        serviceIds = serviceIds.Substring(0, serviceIds.Length - 1);
                    }
                    if (!string.IsNullOrEmpty(expenseIds))
                    {
                        expenseIds = expenseIds.Substring(0, expenseIds.Length - 1);
                    }
                    if (!string.IsNullOrEmpty(milestoneIds))
                    {
                        milestoneIds = milestoneIds.Substring(0, milestoneIds.Length - 1);
                    }
                }
            }
        }
コード例 #10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(Request.QueryString["tableId"]))
            {
                int.TryParse(Request.QueryString["tableId"], out tableId);
            }
            long id = 0;

            if (!string.IsNullOrEmpty(Request.QueryString["id"]) && long.TryParse(Request.QueryString["id"], out id))
            {
                thisGeneral = genBll.GetSingleGeneral(id);
            }
            long parentId = 0;

            if (!string.IsNullOrEmpty(Request.QueryString["parnetId"]) && long.TryParse(Request.QueryString["parnetId"], out parentId))
            {
                parentGeneral = genBll.GetSingleGeneral(parentId);
            }
            if (thisGeneral != null)
            {
                isAdd   = false;
                tableId = thisGeneral.general_table_id;
                if (tableId == (int)GeneralTableEnum.PRODUCT_CATE && thisGeneral.parent_id != null)
                {
                    parentGeneral = genBll.GetSingleGeneral((long)thisGeneral.parent_id);
                }
            }

            if (tableId == 0)
            {
                Response.Write("<script>alert('未获取到相关信息,请刷新页面后重试!');window.close();</script>");
                return;
            }
            thisTable = new DAL.d_general_table_dal().FindById(tableId);
            if (tableId == (int)GeneralTableEnum.TICKET_STATUS)
            {
                tempList = genBll.GetGeneralByTable((int)GeneralTableEnum.SLA_EVENT_TYPE);
            }
            else if (tableId == (int)GeneralTableEnum.PAYMENT_SHIP_TYPE)
            {
                codeList = new CostCodeBLL().GetCodeByCate((int)DicEnum.COST_CODE_CATE.MATERIAL_COST_CODE);
            }
            if (tableId == (int)GeneralTableEnum.PROJECT_STATUS && thisGeneral != null && thisGeneral.is_system == 1)
            {
                Response.Write("<script>alert('系统状态,不能编辑!');window.close();</script>");
                return;
            }

            if (tableId == (int)GeneralTableEnum.ACTION_TYPE)
            {
                tempList = new List <d_general>()
                {
                    genBll.GetSingleGeneral((long)DicEnum.ACTIVITY_CATE.PROJECT_NOTE, true),
                    genBll.GetSingleGeneral((long)DicEnum.ACTIVITY_CATE.CONTRACT_NOTE, true),
                    genBll.GetSingleGeneral((long)DicEnum.ACTIVITY_CATE.TASK_NOTE, true),
                };
            }
            if (tableId == (int)GeneralTableEnum.SYSTEM_SUPPORT_EMAIL)
            {
                var email = genBll.GetSupportEmail();
                if (email != null && isAdd)
                {
                    Response.Write("<script>alert('系统支持邮箱只能有一条!');window.close();</script>");
                    return;
                }
            }
            if (tableId == (int)EMT.DoneNOW.DTO.GeneralTableEnum.SYS_TICKET_RESOLUTION_METRICS && isAdd)
            {
                Response.Write("<script>alert('工单解决参数设置不允许新增!');window.close();</script>");
                return;
            }
            if (tableId == (int)EMT.DoneNOW.DTO.GeneralTableEnum.PRODUCT_CATE)
            {
                tempList = genBll.GetGeneralByTable((int)GeneralTableEnum.INSTALLED_PRODUCT_CATE);
            }
        }
コード例 #11
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!long.TryParse(Request.QueryString["type"], out type))
            {
                Response.Write("<script>alert('获取相关信息失败,返回上一页');window.close();</script>");
            }
            if (!long.TryParse(Request.QueryString["id"], out id))
            {
                id = 0;
            }
            //测试业务范围
            //type = 99;
            //id = 1102;
            //测试项目状态
            //type = 100;
            //id = 1345;
            //测试任务类别
            //type = 101;
            //id = 1807;
            //付款期限
            //type = 102;
            //id = 475;
            //付款类型
            //type = 103;
            //id = 478;
            //配送类型
            //type = 104;
            //id = 493;
            switch (type)
            {
            case (long)QueryType.Line_Of_Business:
                typename = "新增-组织:业务范围";
                break;

            case (long)QueryType.Project_Status:
                typename = "新增-项目和任务:项目状态";
                break;

            case (long)QueryType.Task_Type:
                typename = "新增-项目和任务:任务类型";
                break;

            case (long)QueryType.Payment_Term:
                typename = "新增-财务、会计和发票:付款期限";
                Page.ClientScript.RegisterStartupScript(this.GetType(), OpenWindow.GeneralJs.ToString(), @"$('#newicon').show();", true);
                this.Save_New.Visible = true;
                break;

            case (long)QueryType.Payment_Type:
                typename = "新增-财务、会计和发票:付款类型";
                Page.ClientScript.RegisterStartupScript(this.GetType(), OpenWindow.GeneralJs.ToString(), @"$('#newicon').show();", true);
                this.Save_New.Visible = true;
                break;

            case (long)QueryType.Payment_Ship_Type:
                typename = "新增-财务、会计和发票:配送类型";
                Page.ClientScript.RegisterStartupScript(this.GetType(), OpenWindow.GeneralJs.ToString(), @"$('#newicon').show();", true);
                this.Cost_Code.Visible = true;
                this.Save_New.Visible  = true;
                break;

            default: Response.Write("<script>alert('获取相关信息失败,返回上一页');window.close();</script>"); break;
            }
            if (!IsPostBack)
            {
                if (type == (long)QueryType.Payment_Ship_Type)
                {
                    Cost_Code.DataTextField  = "value";
                    Cost_Code.DataValueField = "key";
                    Cost_Code.DataSource     = gbll.GetCodeList();
                    Cost_Code.DataBind();
                    Cost_Code.Items.Insert(0, new ListItem()
                    {
                        Value = "0", Text = "   ", Selected = true
                    });
                }
                this.Active.Checked = true;
                if (id > 0)//修改
                {
                    general = gbll.GetSingleGeneral(id);
                    if (general != null)
                    {
                        typename       = typename.Replace("新增", "修改");
                        this.Name.Text = general.name;
                        if (!string.IsNullOrEmpty(general.remark))
                        {
                            this.Description.Text = general.remark;
                        }
                        if (general.is_active > 0)
                        {
                            this.Active.Checked = true;
                        }
                        else
                        {
                            this.Active.Checked = false;
                        }
                        if (general.sort_order != null)
                        {
                            this.Sort.Text = general.sort_order.ToString();
                        }
                        if (type == (long)QueryType.Payment_Term && general.ext1 != null)
                        {
                            this.termday.Text = general.ext1;
                        }
                        if (type == (long)QueryType.Payment_Type && general.ext1 != null)
                        {
                            int re;
                            if (int.TryParse(general.ext1, out re))
                            {
                                if (re > 0)
                                {
                                    this.Reimbursable.Checked = true;
                                }
                            }
                        }
                        if (type == (long)QueryType.Payment_Ship_Type)
                        {
                            int co;
                            if (int.TryParse(general.ext1, out co))
                            {
                                if (co > 0)
                                {
                                    this.Cost_Code.SelectedValue = co.ToString();
                                }
                            }
                        }
                    }
                    else
                    {
                        Response.Write("<script>alert('获取相关信息失败,返回上一页');window.close();</script>");
                    }
                }
                else
                {
                }
            }
            else
            {
            }
        }