U9老框架Grid选中行默认同步数量

by chenzhic 2015.12.22 08:23

注:脚本执行有风险,对于客户正式环境请在研发指导下执行。

最近在开发批量退料的时候,有个需求是通过勾选复选框来同步需求的功能,给大家分享一下,希望对大家有帮助,下面是源码:

           UFWebClientGridAdapter gridsn = new UFWebClientGridAdapter(this.DataGrid1);
            AssociationControl assControl = new AssociationControl();
            assControl.SourceServerControl = this.DataGrid1;
            assControl.SourceControl.EventName = UFSoft.UBF.UI.WebControls.Association.UFDateGridEventName.OnBodyRowSelectedValueChange;
            string CanRecedeQty = gridsn.getSelectedValue("args.arg.RowIndex", "ConfirmQtyUOM");
            string RecedeQty = gridsn.getSelectedValue("args.arg.RowIndex", "RecedeQty");
            CodeBlock codeBlock = new CodeBlock();
            codeBlock.Condition = "if((" + gridsn.ClientInstance + ".RowIsChecked(args.arg.RowIndex)==true) && (parseFloat(" + RecedeQty + ")<='0')" + ")";
            gridsn.CellValue.Add(new object[] { "args.arg.RowIndex", "RecedeQty", new string[] { CanRecedeQty, CanRecedeQty, CanRecedeQty } });
            assControl.addBlock(codeBlock);
            codeBlock.TargetControls.addControl(gridsn);
            CodeBlock codeBlock2 = new CodeBlock();
            UFWebClientGridAdapter gridsn2 = new UFWebClientGridAdapter(this.DataGrid1);
            codeBlock2.Condition = "if(" + gridsn2.ClientInstance + ".RowIsChecked(args.arg.RowIndex)==false)";
            gridsn2.CellValue.Add(new object[] { "args.arg.RowIndex", "RecedeQty", new string[] { "0", "0", "0" } });
            assControl.addBlock(codeBlock2);
            codeBlock2.TargetControls.addControl(gridsn2);

Tags:

E制造

评论 (8) -

forex forum 美国 wrote at 2016/12/20 2:04:32 #

We are a group of volunteers and starting a new scheme in our community. Your web site provided us with valuable information to work on. You have done a formidable job and our entire community will be grateful to you.

forex forum 美国 wrote at 2017/2/11 17:24:58 #

Do you have a spam problem on this website; I also am a blogger, and I was wanting to know your situation; many of us have developed some nice methods and we are looking to swap strategies with other folks, why not shoot me an e-mail if interested.

forex forum 美国 wrote at 2017/2/28 10:06:52 #

I have read so many articles or reviews about the blogger lovers however this post is genuinely a fastidious piece of writing, keep it up.

world wide invest 美国 wrote at 2017/3/6 14:39:49 #

Do you have a spam problem on this site; I also am a blogger, and I was curious about your situation; many of us have created some nice practices and we are looking to exchange methods with other folks, please shoot me an e-mail if interested.

forex forum 美国 wrote at 2017/3/8 14:52:15 #

I'm gone to convey my little brother, that he should also pay a quick visit this website on regular basis to take updated from most up-to-date gossip.

forex forum 美国 wrote at 2017/4/15 12:30:12 #

I like what you guys tend to be up too. Such clever work and exposure! Keep up the fantastic works guys I've included you guys to my personal blogroll.

gclub-royal1688 wrote at 2019/6/15 15:54:13 #

Thank you for making me realize this. It's great.

https://www.gclub-royal1688.com/

Gclub wrote at 2019/6/15 16:03:04 #

This article is great. I like it very much. Thank you.

https://www.gclub45.com/

添加评论



biuquote
微笑得意调皮害羞酷大笑惊讶发呆喜欢可怜尴尬闭嘴噘嘴皱眉伤心抓狂呕吐坏笑漫骂发怒
Loading


RecentComments

评论 RSS

Statistics

989 篇文章
0 个单页
742244 条评论
11 次评分
1175229 次访问
访问统计开始于 2019年12月15日
平均日访问 6995 次
当前 98 人在线